1

I am trying to fetch a resource of All users list in Jira, but Jira API sends list of only 50 users. I want to fetch list of all users. How can I do it?

endpoint: https://myurl.atlassian.net/rest/api/3/users/search

Response (only 50 users, not all users)

[
    {
        "self": "https://myurl.atlassian.net/rest/api/3/user?accountId=*********************",
        "accountId": "*********************",
        "accountType": "customer",
        "displayName": "Former user",
        "active": false
    },
    {
        "self": "https://myurl.atlassian.net/rest/api/3/user?accountId=************************",
        "accountId": "************************",
        "accountType": "atlassian",
        "emailAddress": "****************",
        "displayName": "*************",
        "active": true,
        "locale": "en_US"
    },
    {
    ...
    ...
    ...
    },
]
Aashutosh Kumar
  • 615
  • 9
  • 13

1 Answers1

1

you can add in the query the param:

startAt=0&maxResults=1000
ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
  • Thank you, its working, any way to know total number of items and dynamically fetch till last item without hardcoding maxResults. I want maxResults to be dynamically passed in query – Aashutosh Kumar Nov 25 '21 at 10:03