How to fetch the information on user, permission (group/role) , filter etc user holds
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
When transferring data from one user(user1) account to another user account, it becomes challenging to fetch information like user association, with "linked data", assigned & reported work items, owned filters & dashboards, and places where their user1 account may have been individually added (eg. space roles, permission or notification schemes, workflows, etc...)
This article would help in guiding what all resources can be used to get these details.
Solution
Here are some suggestions:
For most of the information, API calls can be used to fetch the details.
Permissions
Check global and Space permissions for a user: POST /rest/api/3/permissions/check
For a list of global permissions, the global permissions granted to a user.
For a list of space permissions and lists of spaces and work items, for each space permission, a list of the spaces and work items a user can access or manipulate.
Based on the returned group or role, you can then filter the associated user.
Space Roles
Get a Space role and its actors: GET /rest/api/3/project/{projectIdOrKey}/role/{id}
Returns the Space role's details and the actors (users/groups) associated with it. The actor list is sorted by display name.
Filters
Get a specific filter by ID: GET /rest/api/3/filter/{id}
Returns the details of a filter.
Get all filters owned by a user: GET /rest/api/3/filter/my
Returns all filters owned by the calling user.
Note: This endpoint must be run authenticated as the respective user whose filters you wish to retrieve — it returns the calling user's own filters only.
Update a filter: PUT /rest/api/3/filter/{id}
Allows you to make changes to an existing filter.
Dashboards
Get owned or shared dashboards for a user: GET /rest/api/3/dashboard
Returns a list of dashboards owned by or shared with the calling user.
Update a dashboard: PUT /rest/api/3/dashboard/{id}
Allows you to update the details of an existing dashboard.
API documents
Please feel free to visit the documents below to explore more API calls as per your requirements
Was this helpful?