GET /api/v2/search/export
Exports a set of results. See Query syntax for the syntax of the query
parameter.
Use this endpoint for search queries that will return more than 1000 results. The result set is ordered only by the created_at
attribute.
The search only returns results of a single object type. The following object types are supported: ticket, organization, user, or group.
You must specify the type in the filter[type]
parameter. Searches with type in the query string will result in an error.
Allowed For
- Agents
Pagination
- Cursor pagination
See Pagination.
Returns a maximum of 1000 records per page. The number of results shown in a page is determined by the page[size]
parameter.
Note: You may experience a speed reduction or a timeout if you request 1000 results per page and you have many archived tickets in the results. Try reducing the number of results per page. We recommend 100 results per page.
The cursor specified by the after_cursor
property in a response expires after one hour.
For more information on cursor-based pagination, see the following articles:
- Comparing cursor pagination and offset pagination
- Paginating through lists using cursor pagination
Limits
This API endpoint is rate-limited to 100 requests per minute per account. The limit also counts towards the global API rate limit.
Response Format
Name | Type | Comment |
---|---|---|
links[next] | string | URL to the next page of results |
meta[has_more] | string | Boolean indicating if there are more results |
meta[after_cursor] | string | Cursor object returned from the Search Service |
results | array | May consist of tickets, users, groups, or organizations, as specified by the filter_type parameter |
The response is similar to the response of GET /api/v2/search.json?
, with a few changes:
links
- Has the following nested properties:prev
andnext
. These replace thenext_page
andprev_page
links. Theprev
property is always null because backward pagination is not supported. Thenext
property may include an auto-generated link to the next page of results.meta
- Has the following nested properties:has_more
andafter_cursor
. Thehas_more
property indicates whether the next page has more results. Theafter_cursor
property is the cursor used to paginate to the next page. It expires after one hour.
There's no count
property.
Servers
- https://{subdomain}.{domain}.com
Query parameters
Name | Type | Required | Description |
---|---|---|---|
query |
String | Yes |
The search query. See Query basics above. For details on the query syntax, see the Zendesk Support search reference |
filtertype |
String | No |
The object type returned by the export query. Can be |
pagesize |
Integer | No |
The number of results shown in a page. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.