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

getSpacePermissionsAssignments

Get space permissions assignments

Details

  • Method: GET
  • Path: /spaces/{id}/permissions
  • Operation ID: getSpacePermissionsAssignments

Parameters

{
  "id": {
    "description": "The ID of the space to be returned.",
    "required": true,
    "location": "path",
    "type": "integer",
    "format": "int64"
  },
  "cursor": {
    "description": "Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the relative URL in the `Link` header to retrieve the `next` set of results.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "limit": {
    "description": "Maximum number of assignments to return. If more results exist, use the `Link` response header to retrieve a relative URL that will return the next set of results.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int32"
  }
}

Response Schema

{
  "title": "MultiEntityResult<SpacePermissionAssignment>",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the space permission."
          },
          "principal": {
            "type": "object",
            "description": "The entity the space permissions corresponds to.",
            "properties": {
              "type": {
                "enum": [
                  "user",
                  "group",
                  "role"
                ],
                "type": "string"
              },
              "id": {
                "type": "string",
                "description": "ID of the entity."
              }
            }
          },
          "operation": {
            "type": "object",
            "description": "The operation the space permission corresponds to.",
            "properties": {
              "key": {
                "enum": [
                  "use",
                  "create",
                  "read",
                  "update",
                  "delete",
                  "copy",
                  "move",
                  "export",
                  "purge",
                  "purge_version",
                  "administer",
                  "restore",
                  "create_space",
                  "restrict_content",
                  "archive"
                ],
                "type": "string",
                "description": "The type of operation."
              },
              "targetType": {
                "enum": [
                  "page",
                  "blogpost",
                  "comment",
                  "attachment",
                  "whiteboard",
                  "database",
                  "embed",
                  "folder",
                  "space",
                  "application",
                  "userProfile"
                ],
                "type": "string",
                "description": "The type of entity the operation type targets."
              }
            }
          }
        }
      }
    },
    "_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('getSpacePermissionsAssignments', {
    # Add required parameters here
})