Developer Portal for YouTrack and Hub Help

Operations with Specific AssignedRole

This resource lets you work with roles assigned to a user or a group in YouTrack.

Resource

/api/assignedRoles/{roleID}

Returned entity

AssignedRole. For the description of the entity attributes, see Supported Fields section.

Supported methods

AssignedRole attributes

Represents a role assigned to a user or a group in a specific scope.

Attributes

This table describes attributes of the AssignedRole entity.

  • To receive an attribute in the response from the server, specify it explicitly in the fields request parameter.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

id

String

The database ID of the assigned role. Read-only.

role

Role

The role that is assigned.

scope

AccessScope

The scope where the role is assigned. Possible values: Global, Organization, or Project.

holder

The user or group that holds the role. Read-only.

Assign a role to a user or a group

Assign a role to a user or a group.

Required permissions

For global roles, requires Low-level Admin Write permission.

For organization roles, requires Update Organization permission.

For project roles, requires Update Project permission.

Request syntax

POST /api/assignedRoles/{roleID}?{fields}

{roleID}

The database ID of AssignedRole

Request parameters

Parameter

Type

Description

fields

String

A list of AssignedRole attributes that should be returned in the response. If no field is specified, only the entityID is returned.

Sample 1

Sample request

https://example.youtrack.cloud/api/assignedRoles?fields=id,role(id,name),scope(id),holder(id)

Sample request body

{ "scope": { "project": { "id": "0-2" }, "$type": "ProjectScope" }, "holder": { "id": "4-3", "$type": "User" }, "role": { "id": "131-5" }, "$type": "AssignedRole" }

Sample response body

{ "scope": { "project": { "id": "0-2" }, "$type": "ProjectScope" }, "holder": { "id": "4-3", "$type": "User" }, "role": { "id": "131-5" }, "id": "31-70", "$type": "AssignedRole" }

Sample 2

Sample request

https://example.youtrack.cloud/api/assignedRoles?fields=id,role(id,name),scope(id),holder(id)

Sample request body

{ "scope": { "project": { "id": "0-2" }, "$type": "ProjectScope" }, "holder": { "id": "4-35", "$type": "NestedGroup" }, "role": { "id": "131-5" }, "$type": "AssignedRole" }

Sample response body

{ "scope": { "project": { "id": "0-2" }, "$type": "ProjectScope" }, "holder": { "id": "4-35", "$type": "NestedGroup" }, "role": { "id": "131-5" }, "id": "31-70", "$type": "AssignedRole" }

Read a Specific AssignedRole

Get a specific assigned role.

Required permissions

Requires Read Role permission in the scope of the assigned role.

Request syntax

GET /api/assignedRoles/{roleID}?{fields}

{roleID}

The database ID of the assigned role.

Request parameters

Parameter

Type

Description

fields

String

A list of AssignedRole attributes that should be returned in the response. If no field is specified, only the entityID is returned.

Sample

Sample request

https://example.youtrack.cloud/api/assignedRoles/31-70?fields=id,role(id,name),scope(id),holder(id)

Sample response body

{ "role": { "name": "Article Reader", "id": "28-33", "$type": "Role" }, "holder": { "id": "24-2", "$type": "User" }, "scope": { "id": "544-0", "$type": "GlobalScope" }, "id": "31-70", "$type": "AssignedRole" }

Revoke a role from a user or a group

Revokes a specific assigned role from a user or a group.

Required permissions

Requires Update Role permission in the scope of the assigned role.

Request syntax

DELETE /api/assignedRoles/{roleID}

{roleID}

The database ID of the assigned role.

Request parameters

Parameter

Type

Description

fields

String

A list of AssignedRole attributes that should be returned in the response. If no field is specified, only the entityID is returned.

Sample

Sample request

https://example.youtrack.cloud/api/assignedRoles/31-70
31 March 2026