Request

Response

    Get a User Role
    GET

    roles/{id}

    Retrieves a role by its ID.

    Resource Information

    Method and URI
    GET
    /AutodeskDM/Services/api/vault/v2/roles/{id}
    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.

    * Required

    Request

    URI Parameters

    id
    string
    The unique identifier of a role.

    Response

    HTTP Status Code Summary

    200
    OK
    The role was successfully retrieved.
    400
    Bad Request
    The role identifier is not valid or no role matches the supplied id. Verify the role ID and try again.
    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 validated but your account does not have permission to read this role. Verify your credentials and permissions, then try again.

    Response

    Body Structure (200)

    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 a role by its ID.

    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/10' \
      -X 'GET' \
      -H 'Accept: application/json'\
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a...'
    

    Response

    {
      "id": "10",
      "roleName": "Item Reviewer",
      "systemName": "Productstream Reviewer",
      "description": "Read-only access over files, folders, and items",
      "url": "/AutodeskDM/Services/api/vault/v2/roles/10"
    }