{"command":{"effect":"read","timeoutSeconds":30,"inputSchema":{"type":"object","description":"<b>Required scope: </b><code>projects:read</code>\n\nTo mirror the functionality of the Asana web app's advanced search feature, the Asana API has a project search endpoint that allows you to build complex filters to find and retrieve the exact data you need.\n#### Premium access\nLike the Asana web product's advance search feature, this search endpoint will only be available to premium Asana users. A user is premium if any of the following is true:\n\n- The workspace in which the search is being performed is a premium workspace\n- The user is a member of a premium team inside the workspace\n\nEven if a user is only a member of a premium team inside a non-premium workspace, search will allow them to find data anywhere in the workspace, not just inside the premium team. Making a search request using credentials of a non-premium user will result in a `402 Payment Required` error.\n#### Pagination\nSearch results are not stable; repeating the same query multiple times may return the data in a different order, even if the data do not change. Because of this, the traditional [pagination](/docs/pagination) available elsewhere in the Asana API is not available here. However, you can paginate manually by sorting the search results by their creation time and then modifying each subsequent query to exclude data you have already seen. Page sizes are limited to a maximum of 100 items, and can be specified by the `limit` query parameter.\n#### Eventual consistency\nChanges in Asana (regardless of whether they’re made though the web product or the API) are forwarded to our search infrastructure to be indexed. This process can take between 10 and 60 seconds to complete under normal operation, and longer during some production incidents. Making a change to a project that would alter its presence in a particular search query will not be reflected immediately. This is also true of the advanced search feature in the web product.\nBecause of this delay, the search endpoint is not suited for use cases that require immediate consistency after writes. If you need read-your-write behavior or strongly consistent results, we recommend using [Get multiple projects](/reference/getprojects) instead.\n#### Rate limits\nYou may receive a `429 Too Many Requests` response if you hit any of our [rate limits](/docs/rate-limits).\n#### Custom field parameters\n| Parameter name | Custom field type | Accepted type |\n|---|---|---|\n| custom_fields.{gid}.is_set | All | Boolean |\n| custom_fields.{gid}.value | Text | String |\n| custom_fields.{gid}.value | Number | Number |\n| custom_fields.{gid}.value | Enum | Enum option ID |\n| custom_fields.{gid}.starts_with | Text only | String |\n| custom_fields.{gid}.ends_with | Text only | String |\n| custom_fields.{gid}.contains | Text only | String |\n| custom_fields.{gid}.less_than | Number only | Number |\n| custom_fields.{gid}.greater_than | Number only | Number |\n\n\nFor example, if the gid of the custom field is 12345, the query parameter to find projects where it is set would be `custom_fields.12345.is_set=true`. To match an exact value for an enum custom field, use the gid of the desired enum option and not the name of the enum option: `custom_fields.12345.value=67890`.\n\n**Not Supported**: searching for multiple exact matches of a custom field, searching for multi-enum custom field","properties":{"path":{"type":"object","properties":{"workspace_gid":{"type":"string","examples":["12345"],"description":"Globally unique identifier for the workspace or organization."}},"required":["workspace_gid"],"additionalProperties":false},"query":{"type":"object","properties":{"opt_pretty":{"type":"boolean","examples":[true],"description":"Provides “pretty” output.\nProvides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging."},"limit":{"type":"integer","minimum":1,"maximum":100,"examples":[50],"description":"Results per search response.\nThe number of objects to return in one search response. The value must be between 1 and 100. Search responses have no `next_page`, so to retrieve further results, sort by `created_at` and repeat the query with a `created_at.before` or `created_at.after` filter that excludes the results you have already seen."},"text":{"type":"string","examples":["Bugs"],"description":"Performs full-text search on the project name."},"sort_by":{"type":"string","enum":["due_date","created_at","completed_at","modified_at","relevance"],"default":"modified_at","examples":["modified_at"],"description":"One of `due_date`, `created_at`, `completed_at`, `relevance`, or `modified_at`, defaults to `modified_at`."},"sort_ascending":{"type":"boolean","default":false,"examples":[false],"description":"Default `false`."},"completed":{"type":"boolean","examples":[false],"description":"Filter on project completion status."},"teams.any":{"type":"string","examples":["12345,67890"],"description":"Comma-separated list of team IDs."},"owner.any":{"type":"string","examples":["12345,67890"],"description":"Comma-separated list of user identifiers to filter on as project owners. This can either be the string \"me\", an email, or the gid of a user."},"members.any":{"type":"string","examples":["12345,67890"],"description":"Comma-separated list of user identifiers to filter on as members. This can either be the string \"me\", an email, or the gid of a user."},"members.not":{"type":"string","examples":["12345,67890"],"description":"Comma-separated list of user identifiers to exclude as members. This can either be the string \"me\", an email, or the gid of a user."},"portfolios.any":{"type":"string","examples":["12345,67890"],"description":"Comma-separated list of portfolio IDs to filter on."},"completed_on":{"type":["string","null"],"format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string or `null`."},"completed_on.before":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string."},"completed_on.after":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string."},"completed_at.before":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string."},"completed_at.after":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string."},"created_on":{"type":["string","null"],"format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string or `null`."},"created_on.before":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string."},"created_on.after":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string."},"created_at.before":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string."},"created_at.after":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string."},"due_on":{"type":["string","null"],"format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string or `null`."},"due_on.before":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string."},"due_on.after":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string."},"due_at.before":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string."},"due_at.after":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string."},"start_on":{"type":["string","null"],"format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string or `null`."},"start_on.before":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string."},"start_on.after":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string."},"opt_fields":{"type":"array","items":{"type":"string","enum":["archived","color","completed","completed_at","completed_by","completed_by.name","created_at","created_from_template","created_from_template.name","current_status","current_status.author","current_status.author.name","current_status.color","current_status.created_at","current_status.created_by","current_status.created_by.name","current_status.html_text","current_status.modified_at","current_status.text","current_status.title","current_status_update","current_status_update.resource_subtype","current_status_update.title","custom_field_settings","custom_field_settings.custom_field","custom_field_settings.custom_field.asana_created_field","custom_field_settings.custom_field.created_by","custom_field_settings.custom_field.created_by.name","custom_field_settings.custom_field.currency_code","custom_field_settings.custom_field.custom_label","custom_field_settings.custom_field.custom_label_position","custom_field_settings.custom_field.date_value","custom_field_settings.custom_field.date_value.date","custom_field_settings.custom_field.date_value.date_time","custom_field_settings.custom_field.default_access_level","custom_field_settings.custom_field.description","custom_field_settings.custom_field.display_value","custom_field_settings.custom_field.enabled","custom_field_settings.custom_field.enum_options","custom_field_settings.custom_field.enum_options.color","custom_field_settings.custom_field.enum_options.enabled","custom_field_settings.custom_field.enum_options.name","custom_field_settings.custom_field.enum_value","custom_field_settings.custom_field.enum_value.color","custom_field_settings.custom_field.enum_value.enabled","custom_field_settings.custom_field.enum_value.name","custom_field_settings.custom_field.format","custom_field_settings.custom_field.has_notifications_enabled","custom_field_settings.custom_field.html_text_value","custom_field_settings.custom_field.id_prefix","custom_field_settings.custom_field.input_restrictions","custom_field_settings.custom_field.is_formula_field","custom_field_settings.custom_field.is_global_to_workspace","custom_field_settings.custom_field.is_lookup_field","custom_field_settings.custom_field.is_value_read_only","custom_field_settings.custom_field.multi_enum_values","custom_field_settings.custom_field.multi_enum_values.color","custom_field_settings.custom_field.multi_enum_values.enabled","custom_field_settings.custom_field.multi_enum_values.name","custom_field_settings.custom_field.name","custom_field_settings.custom_field.number_value","custom_field_settings.custom_field.people_value","custom_field_settings.custom_field.people_value.name","custom_field_settings.custom_field.precision","custom_field_settings.custom_field.privacy_setting","custom_field_settings.custom_field.reference_value","custom_field_settings.custom_field.reference_value.name","custom_field_settings.custom_field.representation_type","custom_field_settings.custom_field.resource_subtype","custom_field_settings.custom_field.text_value","custom_field_settings.custom_field.type","custom_field_settings.is_important","custom_field_settings.parent","custom_field_settings.parent.name","custom_field_settings.parent.resource_subtype","custom_field_settings.project","custom_field_settings.project.name","custom_field_settings.project.resource_subtype","custom_fields","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.display_value","custom_fields.enabled","custom_fields.enum_options","custom_fields.enum_options.color","custom_fields.enum_options.enabled","custom_fields.enum_options.name","custom_fields.enum_value","custom_fields.enum_value.color","custom_fields.enum_value.enabled","custom_fields.enum_value.name","custom_fields.id_prefix","custom_fields.input_restrictions","custom_fields.is_formula_field","custom_fields.is_lookup_field","custom_fields.multi_enum_values","custom_fields.multi_enum_values.color","custom_fields.multi_enum_values.enabled","custom_fields.multi_enum_values.name","custom_fields.name","custom_fields.number_value","custom_fields.representation_type","custom_fields.text_value","custom_fields.type","custom_type","custom_type.asana_created_type_identifier","custom_type.name","default_access_level","default_view","due_date","due_on","followers","followers.name","html_notes","icon","members","members.name","minimum_access_level_for_customization","minimum_access_level_for_sharing","modified_at","name","notes","owner","permalink_url","privacy_setting","project_brief","public","resource_subtype","start_on","team","team.name","workspace","workspace.name"]},"examples":[["archived","color","completed","completed_at","completed_by","completed_by.name","created_at","created_from_template","created_from_template.name","current_status","current_status.author","current_status.author.name","current_status.color","current_status.created_at","current_status.created_by","current_status.created_by.name","current_status.html_text","current_status.modified_at","current_status.text","current_status.title","current_status_update","current_status_update.resource_subtype","current_status_update.title","custom_field_settings","custom_field_settings.custom_field","custom_field_settings.custom_field.asana_created_field","custom_field_settings.custom_field.created_by","custom_field_settings.custom_field.created_by.name","custom_field_settings.custom_field.currency_code","custom_field_settings.custom_field.custom_label","custom_field_settings.custom_field.custom_label_position","custom_field_settings.custom_field.date_value","custom_field_settings.custom_field.date_value.date","custom_field_settings.custom_field.date_value.date_time","custom_field_settings.custom_field.default_access_level","custom_field_settings.custom_field.description","custom_field_settings.custom_field.display_value","custom_field_settings.custom_field.enabled","custom_field_settings.custom_field.enum_options","custom_field_settings.custom_field.enum_options.color","custom_field_settings.custom_field.enum_options.enabled","custom_field_settings.custom_field.enum_options.name","custom_field_settings.custom_field.enum_value","custom_field_settings.custom_field.enum_value.color","custom_field_settings.custom_field.enum_value.enabled","custom_field_settings.custom_field.enum_value.name","custom_field_settings.custom_field.format","custom_field_settings.custom_field.has_notifications_enabled","custom_field_settings.custom_field.html_text_value","custom_field_settings.custom_field.id_prefix","custom_field_settings.custom_field.input_restrictions","custom_field_settings.custom_field.is_formula_field","custom_field_settings.custom_field.is_global_to_workspace","custom_field_settings.custom_field.is_lookup_field","custom_field_settings.custom_field.is_value_read_only","custom_field_settings.custom_field.multi_enum_values","custom_field_settings.custom_field.multi_enum_values.color","custom_field_settings.custom_field.multi_enum_values.enabled","custom_field_settings.custom_field.multi_enum_values.name","custom_field_settings.custom_field.name","custom_field_settings.custom_field.number_value","custom_field_settings.custom_field.people_value","custom_field_settings.custom_field.people_value.name","custom_field_settings.custom_field.precision","custom_field_settings.custom_field.privacy_setting","custom_field_settings.custom_field.reference_value","custom_field_settings.custom_field.reference_value.name","custom_field_settings.custom_field.representation_type","custom_field_settings.custom_field.resource_subtype","custom_field_settings.custom_field.text_value","custom_field_settings.custom_field.type","custom_field_settings.is_important","custom_field_settings.parent","custom_field_settings.parent.name","custom_field_settings.parent.resource_subtype","custom_field_settings.project","custom_field_settings.project.name","custom_field_settings.project.resource_subtype","custom_fields","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.display_value","custom_fields.enabled","custom_fields.enum_options","custom_fields.enum_options.color","custom_fields.enum_options.enabled","custom_fields.enum_options.name","custom_fields.enum_value","custom_fields.enum_value.color","custom_fields.enum_value.enabled","custom_fields.enum_value.name","custom_fields.id_prefix","custom_fields.input_restrictions","custom_fields.is_formula_field","custom_fields.is_lookup_field","custom_fields.multi_enum_values","custom_fields.multi_enum_values.color","custom_fields.multi_enum_values.enabled","custom_fields.multi_enum_values.name","custom_fields.name","custom_fields.number_value","custom_fields.representation_type","custom_fields.text_value","custom_fields.type","custom_type","custom_type.asana_created_type_identifier","custom_type.name","default_access_level","default_view","due_date","due_on","followers","followers.name","html_notes","icon","members","members.name","minimum_access_level_for_customization","minimum_access_level_for_sharing","modified_at","name","notes","owner","permalink_url","privacy_setting","project_brief","public","resource_subtype","start_on","team","team.name","workspace","workspace.name"]],"description":"This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. Properties can include nested fields. To learn more, see the [input/output options guide](/docs/inputoutput-options#selecting-nested-fields)."}},"required":[],"additionalProperties":false}},"required":["path"],"additionalProperties":false},"name":"Search projects in a workspace","id":"asana.searchprojectsforworkspace","example":{"path":{"workspace_gid":"12345"}},"maxRequests":1,"summary":false}}