Queries
workspaceRoles
Retrieves all available roles for a specific workspace in a hub.
Template for Query:
query GetWorkspaceRoles($hubId: ID!, $workspaceUrn: String!, $pagination: PaginationInput) {
workspaceRoles(hubId: $hubId, workspaceUrn: $workspaceUrn, pagination: $pagination) {
# WorkspaceRoles Fields
}
}
Arguments
| hubId* ID! non-null | The ID of the hub that contains the workspace. |
| workspaceUrn* String! non-null | The URN of the workspace to get roles for. |
| pagination | Specifies how to paginate through the workspace roles. |
* Required
Possible Returns
| Value Type | Description |
|---|---|
WorkspaceRoles! non-null |
Paginated collection of permission-based roles available for assignment to user groups within a specific workspace. |
Examples
Example 1
Retrieves all available roles for a specific workspace in a hub.
Query:
query WorkspaceRoles($hubId: ID!, $workspaceUrn: String!) {
workspaceRoles(hubId: $hubId, workspaceUrn: $workspaceUrn) {
results {
urn
name
}
}
}
Show More
Query Variables:
{
"hubId": "urn:adsk.ace:beta.scope:02dd340f-3e84-4db8-b6a1-56a964a202c7",
"workspaceUrn": "urn:adsk.plm:tenant.workspace:YOPMAIL9163.112"
}
Response:
{
"data": {
"workspaceRoles": {
"results": [
{
"urn": "urn:adsk.plm:tenant.role:YOPMAIL9163.287",
"name": "Editor [Change Requests]"
},
{
"urn": "urn:adsk.plm:tenant.role:YOPMAIL9163.285",
"name": "Viewer [Change Requests]"
}
]
}
}
}
Show More