getSpaceRoleAssignments
Get space role assignments
Details
- Method:
GET - Path:
/spaces/{id}/role-assignments - Operation ID:
getSpaceRoleAssignments
Parameters
{
"id": {
"description": "The ID of the space for which to retrieve assignments.",
"required": true,
"location": "path",
"type": "integer"
},
"role-id": {
"description": "Filters the returned role assignments to the provided role ID.",
"required": false,
"location": "query",
"type": "string"
},
"role-type": {
"description": "Filters the returned role assignments to the provided role type.",
"required": false,
"location": "query",
"type": "string"
},
"principal-id": {
"description": "Filters the returned role assignments to the provided principal id. If specified, a principal-type must also be specified. Paired with a `principal-type` of `ACCESS_CLASS`, valid values include [`anonymous-users`, `jsm-project-admins`, `authenticated-users`, `all-licensed-users`, `all-product-admins`]",
"required": false,
"location": "query",
"type": "string"
},
"principal-type": {
"description": "Filters the returned role assignments to the provided principal type. If specified, a principal-id must also be specified.",
"required": false,
"location": "query",
"type": "string",
"enum": [
"USER",
"GROUP",
"ACCESS_CLASS"
]
},
"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 space roles 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<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('getSpaceRoleAssignments', {
# Add required parameters here
})