Background for the question - I'm one of the software developers from a software-based MNC and we are working on one of our client's app requirements which is to build a connector kind of app around Zendesk API. I have thoroughly gone through Zendesk's API documentation and I see there are multiple APIs for retrieving the records of various objects.
Broadly I found there are 4 categories of APIs for records retrieval/fetching
Following is our understanding for each of the retrieval APIs castegory, we just want clarity on which category of API to use over others in which case.
1. Object-specific APIs
Example: /api/v2/tickets or /api/v2/users
- I don't see many limitations on this category of APIs, we can retrieve all the tickets, we can also retrieve the individual record by using its ID, and we can get all tickets of a specific user or specific organization.
- The only limitation I see here is that we can not search tickets by different ticket properties like tags or create/update date&time
- I did not see any documented retrieval limit on this API, even if there are a million records, I believe I can retrieve them all using pagination if I'm not wrong.
2. General Search API
Example: /api/v2/search
- I can search the object like ticket/user/org with this API
- Search with many different object-specific properties is possible like with tag, user, data&time
- Available records to search are not immediately available, it takes some time for records to get indexed
- I can only retrieve a maximum of 1000 records with this API
- Probable use case: To search the records when lesser results are expected
3. Export Search API
Example: /api/v2/search/export
- I can use date&time filters, and also search using different other properties specific to the object.
- I did not see any documented retrieval limit on this API, even if there are a million records, I believe I can retrieve them all using pagination if I'm not wrong.
4. Incremental Export API
Example: /api/v2/incremental/tickets
- We can only make 10 requests per minute
- There is no provision to search the records
- We don't get the record of the current minute running
- We can keep exporting the records until the last record is found with either cursor or time pagination
- Up to 1000 records can be fetched in each page
- I did not see any documented retrieval limit on this API, even if there are a million records, I believe I can retrieve them all using pagination if I'm not wrong.
- Probable use case: To export the records quickly to some other env or account
- We have confusion over the following two API categories, Object-specific API and Export Search API. Why not use Export search API over object-specific-API? Since at least we did not find anything that Object-specific API can do but not Export-search API. Export-search API can do many other things that object-specific API can not do, And also there are no documented limitations on Export-search API? So We think the export-search API is the best API for most of the use cases of retrieval on ticket/user/organization
- Also we were wondering why to use general search API when export search API can do pretty much the same things without any limits on the number of output records?
Please correct us if we are mistaken