{"command":{"effect":"read","timeoutSeconds":30,"inputSchema":{"type":"object","description":"<b>Required scope: </b><code>records:read</code>\n\nTo mirror the functionality of the Asana web app's advanced search feature, this endpoint allows you to build complex filters to find and retrieve records across all of a workspace's tables.\nCustom field filters are also supported, using the same `custom_fields.{gid}.*` query parameters documented for [task search](/reference/searchtasksforworkspace).\n#### Premium access\nLike task search, this endpoint is only available to premium Asana users. 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. 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 are forwarded to our search infrastructure to be indexed, which can take between 10 and 60 seconds to complete under normal operation. If you need read-your-write behavior, use [Get records in a table](/reference/getrecordsfortable) instead.","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 page.\nThe number of objects to return per page. The value must be between 1 and 100."},"text":{"type":"string","examples":["Renewal"],"description":"Performs full-text search on the record name"},"teams.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of team IDs"},"followers.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"followers.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"tables.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of table IDs"},"tables.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of table IDs"},"tables.all":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of table IDs"},"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_on":{"type":["string","null"],"format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string or `null`"},"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"},"sort_by":{"type":"string","enum":["created_at","modified_at"],"default":"modified_at","examples":["modified_at"],"description":"One of `created_at` or `modified_at`, defaults to `modified_at`"},"sort_ascending":{"type":"boolean","default":false,"examples":[true],"description":"Default `false`"},"opt_fields":{"type":"array","items":{"type":"string","enum":["comment_count","created_at","created_by","created_by.name","custom_fields","custom_fields.asana_created_field","custom_fields.created_by","custom_fields.created_by.name","custom_fields.currency_code","custom_fields.custom_label","custom_fields.custom_label_position","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.default_access_level","custom_fields.description","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.format","custom_fields.has_notifications_enabled","custom_fields.html_text_value","custom_fields.id_prefix","custom_fields.input_restrictions","custom_fields.is_formula_field","custom_fields.is_global_to_workspace","custom_fields.is_lookup_field","custom_fields.is_value_read_only","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.people_value","custom_fields.people_value.name","custom_fields.precision","custom_fields.privacy_setting","custom_fields.reference_value","custom_fields.reference_value.name","custom_fields.representation_type","custom_fields.resource_subtype","custom_fields.text_value","custom_fields.type","default_access_level","deleted_at","is_in_archived_table","modified_at","name","permalink_url","table","table.name","workspace","workspace.name"]},"examples":[["comment_count","created_at","created_by","created_by.name","custom_fields","custom_fields.asana_created_field","custom_fields.created_by","custom_fields.created_by.name","custom_fields.currency_code","custom_fields.custom_label","custom_fields.custom_label_position","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.default_access_level","custom_fields.description","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.format","custom_fields.has_notifications_enabled","custom_fields.html_text_value","custom_fields.id_prefix","custom_fields.input_restrictions","custom_fields.is_formula_field","custom_fields.is_global_to_workspace","custom_fields.is_lookup_field","custom_fields.is_value_read_only","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.people_value","custom_fields.people_value.name","custom_fields.precision","custom_fields.privacy_setting","custom_fields.reference_value","custom_fields.reference_value.name","custom_fields.representation_type","custom_fields.resource_subtype","custom_fields.text_value","custom_fields.type","default_access_level","deleted_at","is_in_archived_table","modified_at","name","permalink_url","table","table.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 records in a workspace","id":"asana.searchrecordsforworkspace","example":{"path":{"workspace_gid":"12345"}},"maxRequests":1,"summary":false}}