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
fieldsrequest 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. |
role | The role that is assigned. | |
scope | The scope where the role is assigned. Possible values: Global, Organization, or Project. | |
holder | The user or group that holds the role. |
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
{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 |
Sample 1
Sample request
Sample request body
Sample response body
Sample 2
Sample request
Sample request body
Sample response body
Read a Specific AssignedRole
Get a specific assigned role.
Required permissions
Requires Read Role permission in the scope of the assigned role.
Request syntax
{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 |
Sample
Sample request
Sample response body
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
{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 |