Open Context Protocol is live! πŸš€ Read the launch post

addActorUsers

Add actors to project role

Details

  • Method: POST
  • Path: /rest/api/3/project/{projectIdOrKey}/role/{id}
  • Operation ID: addActorUsers

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": true,
    "location": "path",
    "type": "integer",
    "format": "int64"
  },
  "group": {
    "description": "The name of the group to add. This parameter cannot be used with the `groupId` parameter. As a group's name can change, use of `groupId` is recommended.",
    "required": false,
    "location": "body",
    "type": "array"
  },
  "groupId": {
    "description": "The ID of the group to add. This parameter cannot be used with the `group` parameter.",
    "required": false,
    "location": "body",
    "type": "array"
  },
  "user": {
    "description": "The user account ID of the user to add.",
    "required": false,
    "location": "body",
    "type": "array"
  }
}

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('addActorUsers', {
    # Add required parameters here
})