roles
Retrieves roles. The returned list depends on the permissions of the user passed in via BearerToken. If the user has AdminUserRead permission, all roles are returned. If not, only the roles that are assigned to the user are returned.
Resource Information
| Method and URI | GET /AutodeskDM/Services/api/vault/v2/roles |
| Authentication Context | User context required |
| Required OAuth Scopes | No scopes required |
| Data Format | JSON |
Request
Headers
| Authorization* string | Must be Bearer <token>, where <token> is a three-legged access token obtained via an Authorization Code flow or a Secure Service Account (SSA) flow.
The SSA flow is designed for headless server-to-server operations. While it functions like a two-legged flow (no user interaction), it is classified as three-legged because it preserves user context. |
Request
Query String Parameters
| limit int | The maximum number of results to return per page. Defaults to 100.
The hard upper bound is controlled by the Page size configuration setting, which an administrator can update through ADMS (Global Setting -> Page size configuration). |
| cursorState string | The cursor token used to fetch the next page of results. Pass the value returned in pagination.nextUrl from the previous response to continue paging. |
Response
HTTP Status Code Summary
| 200 OK | The list of roles was successfully retrieved. |
| 401 Unauthorized | The supplied authorization header was not valid or the supplied token scope was not acceptable. Verify authentication and try again. |
| 403 Forbidden | The request was successfully validated but lacking the required permissions. Verify your credentials and permissions before you send this request again. |
Response
Body Structure (200)
| pagination object | Contains pagination metadata for navigating through large result sets. |
| limit int | The maximum number of results that can be returned in this response. The actual number of results may be fewer due to filtering, data availability, or other constraints. This reflects the limit value applied by the server, which may differ from the requested limit. |
| totalResults int | The total number of results available across all pages that match the query criteria, regardless of pagination limits. |
| indexingStatus enum:string | Indicates the current status of the indexing engine. This status helps users understand whether the indexing operation is complete or still in progress. This is particularly important for customers with large datasets, as indexing can take a considerable amount of time to complete.
Possible values:
Note: When the status is either ‘IndexingProperties’ or ‘IndexingContent’, the search results are incomplete because the indexes are still being created. Complete search results will be available once fully indexed. |
| nextUrl string | The URL used to retrieve the next page of results. The URL includes an embedded cursor token for the subsequent call. When null or absent, this is the final page. Note that a page may be empty but still include a next page URL. Continue paging until this attribute is null or absent. |
| results array: object | An array of roles. |
| id string | A unique identifier of the role. |
| roleName string | The name of the role. |
| systemName string | The system name of the Role. |
| description string | A human-readable description of the role’s purpose. |
| url string | The relative URL to access this object. |
Example
This example illustrates how to get all roles from the Vault server, with a limit of 2.
Note: {VaultServerAddress} is used as a placeholder in the example(s) and could represent one of the following:
- Vault Server IP address or hostname. Ex: http://10.41.110.49.
- Vault Gateway URL if gateway is configured. Ex: https://test.vg.autodesk.com.
Request
curl -v '{VaultServerAddress}/AutodeskDM/Services/api/vault/v2/roles?limit=2' \
-X 'GET' \
-H 'Accept: application/json'\
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a...'
Response
{
"pagination": {
"limit": 2,
"totalResults": 25,
"nextUrl": "/AutodeskDM/Services/api/vault/v2/roles?limit=2&cursorState=SQBkAEMAdQByAHMAbwByAC0AdgAxADoAMgA_",
"indexingStatus": "NA"
},
"results": [
{
"id": "1",
"roleName": "Administrator",
"systemName": "Administrator",
"description": "Full control over all folders and administrative server privileges",
"url": "/AutodeskDM/Services/api/vault/v2/roles/1"
},
{
"id": "2",
"roleName": "Document Editor (Level 2)",
"systemName": "Vault Editor",
"description": "Full control over files, folders, and their properties",
"url": "/AutodeskDM/Services/api/vault/v2/roles/2"
}
]
}