Get actors under roles - Rest Api

Hi!

I’m trying to get all actors under one role from our Jira.

I know that we have this endpoint: GET /rest/api/3/project/{projectIdOrKey}/role/{id}

This lets me get all users under one role of one Project and it’s working as it should but I want to get all users from this role…

Documentation: GET /rest/v3/#api-rest-api-3-project-projectIdOrKey-role-id-get

So I found this endpoint: https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-role-id-get

Which should return to me every actor under this role and his scope (project). The problem is that this endpoint returns just the description of the role, without the actors.

Response:

{
    "self": "https://xxxx.atlassian.net/rest/api/3/role/YYYYY",
    "name": "Team",
    "id": YYYY,
    "description": "All team members"
}

Documentation: https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-role-id-get

Is there any limit or something for this endpoint?

I tested and some roles return a few actors but this one doesn’t.

Could you help me?

Thank you!

Hi!

It returns default members of this role not users that are assigned to this role under project - as far as I understand. It should return you default members from global roles list i.e. the list of global project roles where you can add default members.

Margus

1 Like

I see! Well, I think I missed the default part.

I will use the first one them.

Thank you, Margus!