I'm using GET /rest/servicedeskapi/servicedesk/{serviceDeskId}/customer with query params "start" and "limit". By default, the limit is 50. Thereby when I'm trying put a limit on 300 it still returns 50.
Question: Is there some bounds putting a high limit value on this request?
Hey Artem,
First, I do need to note that the /customer endpoint is experimental - so oddities can (and do, as explained momentarily) occur with the parameters. These are technically not supported in the product yet. Our official line for experimental endpoints: "Features and methods marked as experimental may change without notice."
After tinkering with the endpoint for a while, I noticed that the start value returned by the results is currently always 0, even if you define (and are being returned) later start values. This is definitely a bug.
For the limit parameter, we've got this line in the documentation:
The maximum number of users to return per page. Default: 50.
This (50) does appear to be the upper limit. You can set a lower limit (such as 5) and it will return that many results. But no more than 50. I see how this is confusing from the documentation - I had to play around with the size and limit parameters for a bit to determine which had an effect. Here are some pointers on how they currently operate:
I've opened the two following bugs about this endpoint given the discrepancies:
Given all the above, my recommendation is to increment the start parameter in values of 50 when you're iterating through responses. You'll know that you're on the last page of results when the size in the response drops below 50 or becomes zero (if you proceed to the next page beyond the actual "last page". The last page would have a size 50 if you had a number of customers divisible by 50, example: 200 customers, start 150)
I hope this helps clarify things to get you the correct results you need for this experimental API endpoint.
Cheers,
Daniel
Hi @Daniel Eads
Thank you for committing to my question!
That exactly what I eventually decided to do.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.