Is there a limit for the repeated query parameter accountId when retrieving users?

Hi,

There are a few endpoints that use the following strategy to bulk retrieve users.

url?accountId=x&accountId=y&accountId=z....

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-email-bulk-get
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-bulk-get

Is there a documented limit somewhere that mentions a maximum amount of account-ids for such requests?

A quick google search for maximum URL length indicates that it is suggested to not exceed a URL size of 2048 characters or a query length of 1024 characters. With ‘&accountId=x’ being over roughly 50 characters, that is being done quite easily.

I think practically the limit is the upper limit on the URL size, rather than the number of account IDs.

1 Like

For what it’s worth, we are using the /rest/api/user/email/bulk endpoint in production and after some testing have settled on a limit of 75 account IDs for that endpoint. We use this hundreds of time per day and it hasn’t failed a single time so far, so I think you can consider 75 to be somewhat safe. Realistically, you could probably even go higher, but 75 is enough for us so we never tried.

Cheers,
Sven

2 Likes

Thanks for the information @sven.schatter

@sven.schatter FYI, we are seeing ‘HTTP 400 Request header is too large’ errors as of today with 75 account-ids in the URL.

The breaking point seems to be around 40 account-ids for us. I have set the limit to 35 to be save with longer base-urls and additional query parameters.