Operations with a Specific Project Role of a Group
warning
This is a Hub REST API method, which uses the Hub REST API URL.
We're including this page in the YouTrack REST API section for reference. For more details, see Hub REST API reference.
This resource lets you work with a specific role granted to a group for a specific project.
Resource |
|
Returned entity | ProjectRole. For the description of the entity attributes, see ProjectRole Attributes. |
Supported methods |
ProjectRole Attributes
Represents a role that a group has in a specific project.
Attributes
This table describes attributes of the ProjectRole
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 unique identifier of the project role. |
owner | Set.<authorityHolder> | The list of users and groups that this project role is granted to. |
project | Set.<project> | The list of projects in which the role is used as a resource. |
role | Set.<role> | The role that the user has in the project. |
Read a Specific Project Role of a Group
Get the specific project role of a group.
tip
Requires permissions: Read Role, Read Group, Read Project Full
Request Syntax
GET <Hub Service URL>/api/rest/usergroups/{groupID}/projectroles/{projectRoleID}?{fields}
Request Parameters
Parameter | Type | Description |
---|---|---|
fields | String | Optional. Returns only the specified subset of the fields for each Project Role. Use Fields Syntax to define the subset. |
Sample
Request
https://example.youtrack.cloud/hub/api/rest/usergroups/c408bf43-ab05-476f-9b36-a9fe0cad45c9/projectroles/bc2dff98-463a-4d74-b765-dbba4ecb3234?fields=id,role(name),project(name)
Response Body
{
"type": "projectRole",
"id": "bc2dff98-463a-4d74-b465-dbba4ecb3234",
"role": {
"name": "Contributor",
"immutable": false
},
"project": {
"name": "Model Engineering"
}
}
Remove a Specific Project Role from a Group
Remove a specific project role from a group.
tip
Requires permissions: Read Role, Read Group, Update Project
Request Syntax
DELETE <Hub Service URL>/api/rest/usergroups/{groupID}/projectroles/{projectRoleID}
Sample
Request
https://example.youtrack.cloud/hub/api/rest/usergroups/c408bf43-ab05-476f-9b36-a9fe0cad45c9/projectroles/bc2dff98-463a-4d74-b765-dbba4ecb3234