setActors
Set actors for project role
Details
- Method:
PUT - Path:
/rest/api/3/project/{projectIdOrKey}/role/{id} - Operation ID:
setActors
Parameters
{
"projectIdOrKey": {
"description": "The project ID or project key (case sensitive).",
"required": true,
"location": "path",
"type": "string"
},
"id": {
"description": "The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs.",
"required": false,
"location": "body",
"type": "integer"
},
"categorisedActors": {
"description": "The actors to add to the project role.\n\nAdd groups using:\n\n * `atlassian-group-role-actor` and a list of group names.\n * `atlassian-group-role-actor-id` and a list of group IDs.\n\nAs a group's name can change, use of `atlassian-group-role-actor-id` is recommended. For example, `\"atlassian-group-role-actor-id\":[\"eef79f81-0b89-4fca-a736-4be531a10869\",\"77f6ab39-e755-4570-a6ae-2d7a8df0bcb8\"]`.\n\nAdd users using `atlassian-user-role-actor` and a list of account IDs. For example, `\"atlassian-user-role-actor\":[\"12345678-9abc-def1-2345-6789abcdef12\", \"abcdef12-3456-789a-bcde-f123456789ab\"]`.",
"required": false,
"location": "body",
"type": "object"
}
}Response Schema
{
"additionalProperties": false,
"description": "Details about the roles in a project.",
"properties": {
"actors": {
"description": "The list of users who act in this role.",
"items": {
"additionalProperties": false,
"description": "Details about a user assigned to a project role.",
"properties": {
"actorGroup": {
"allOf": [
{
"$ref": "#/components/schemas/ProjectRoleGroup"
}
],
"readOnly": true
},
"actorUser": {
"allOf": [
{
"$ref": "#/components/schemas/ProjectRoleUser"
}
],
"readOnly": true
},
"avatarUrl": {
"description": "The avatar of the role actor.",
"format": "uri",
"readOnly": true,
"type": "string"
},
"displayName": {
"description": "The display name of the role actor. For users, depending on the userβs privacy setting, this may return an alternative value for the user's name.",
"readOnly": true,
"type": "string"
},
"id": {
"description": "The ID of the role actor.",
"format": "int64",
"readOnly": true,
"type": "integer"
},
"name": {
"description": "This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.",
"readOnly": true,
"type": "string"
},
"type": {
"description": "The type of role actor.",
"enum": [
"atlassian-group-role-actor",
"atlassian-user-role-actor"
],
"readOnly": true,
"type": "string"
}
},
"type": "object",
"xml": {
"name": "projectRoleActor"
}
},
"readOnly": true,
"type": "array"
},
"admin": {
"description": "Whether this role is the admin role for the project.",
"readOnly": true,
"type": "boolean"
},
"currentUserRole": {
"description": "Whether the calling user is part of this role.",
"type": "boolean"
},
"default": {
"description": "Whether this role is the default role for the project",
"readOnly": true,
"type": "boolean"
},
"description": {
"description": "The description of the project role.",
"readOnly": true,
"type": "string"
},
"id": {
"description": "The ID of the project role.",
"format": "int64",
"readOnly": true,
"type": "integer"
},
"name": {
"description": "The name of the project role.",
"type": "string"
},
"roleConfigurable": {
"description": "Whether the roles are configurable for this project.",
"readOnly": true,
"type": "boolean"
},
"scope": {
"allOf": [
{
"$ref": "#/components/schemas/Scope"
}
],
"description": "The scope of the role. Indicated for roles associated with [next-gen projects](https://confluence.atlassian.com/x/loMyO).",
"readOnly": true
},
"self": {
"description": "The URL the project role details.",
"format": "uri",
"readOnly": true,
"type": "string"
},
"translatedName": {
"description": "The translated name of the project role.",
"type": "string"
}
},
"type": "object"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('jira')
# Call this tool
result = await agent.call_tool('setActors', {
# Add required parameters here
})