Open Context Protocol is live! 🚀 Read the launch post
setSpaceRoleAssignments

setSpaceRoleAssignments

Set space role assignments

Details

  • Method: POST
  • Path: /spaces/{id}/role-assignments
  • Operation ID: setSpaceRoleAssignments

Parameters

{
  "id": {
    "description": "The ID of the space for which to retrieve assignments.",
    "required": true,
    "location": "path",
    "type": "integer"
  }
}

Response Schema

{
  "title": "MultiEntityResult<SpaceRoleAssignment>",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "principal": {
            "type": "object",
            "description": "The principal of the role assignment.",
            "properties": {
              "principalType": {
                "type": "string",
                "description": "The principal type.",
                "enum": [
                  "USER",
                  "GROUP",
                  "ACCESS_CLASS"
                ]
              },
              "principalId": {
                "type": "string",
                "description": "The principal ID."
              }
            }
          },
          "roleId": {
            "type": "string",
            "description": "The role to which the principal is assigned."
          }
        }
      }
    },
    "_links": {
      "type": "object",
      "properties": {
        "next": {
          "type": "string",
          "description": "Used for pagination. Contains the relative URL for the next set of results, using a cursor query parameter.\nThis property will not be present if there is no additional data available."
        },
        "base": {
          "type": "string",
          "description": "Base url of the Confluence site."
        }
      }
    }
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('confluence')

# Call this tool
result = await agent.call_tool('setSpaceRoleAssignments', {
    # Add required parameters here
})