Developer Portal for YouTrack and Hub Help

Operations with a Specific Project Role of a Group

This resource lets you work with a specific role granted to a group for a specific project.

Resource

<Hub Service URL>/api/rest/usergroups/{groupID}/projectroles/{projectRoleID}

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. Read-only.

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.

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.

Request Syntax

DELETE &lt;Hub Service URL&gt;/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
Last modified: 30 April 2024