Using the REST API to get all active users with specific parameters

Marcel Schmaltz April 24, 2023

Hello,

i'm currently trying to call the REST API via Python with some query definitions. My problem is that I'm not able to use more than one parameter in the executed query.

When i'm executing the following call it works fine:


https://my-tanant.atlassian.net/rest/api/2/user?accountId=myAccountID


The result here is my one and only Admin Account with all parameters i'm expecting.


But when i'm executing the following call the response is working but it seems like i get all informations out of the API:

https://my-tanant.atlassian.net/rest/api/2/user/search?query=&accountID=myAccountID&maxResults=1000&accountType=atlassian&includeActive=True

Can someone tell me, how to implement more than just one query call?
Is it even possible?

2 answers

0 votes
Marcel Schmaltz April 27, 2023

Hello @Himanshi ,

unfortunately thats not exactly what i'm looking for.
I'm trying to get all active users within a defined parameter range.
So i dont want to define the AccountID everytime I send a request. 

0 votes
Himanshi
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2023

Hello @Marcel Schmaltz , 

Welcome to Community !

You can try using the user-bulk -get user api call:

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-user-bulk-get

This would help you to fetch more users. Please go through the document and try testing this. Hope it would help you. 

Have a nice day !

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events