Get current session
GET
sessions/{id}
Get user session tied to Bearer token. Pass @current to get the current active user session.
Resource Information
Method and URI | GET /AutodeskDM/Services/api/vault/v2/sessions/{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 obtained via a three-legged OAuth flow. |
* Required
Request
URI Parameters
id string | The unique identifier of a login session. |
Response
HTTP Status Code Summary
200 OK | The request succeeded. The response contains the session. |
401 Unauthorized | The supplied authorization header was not valid or the supplied token scope was not acceptable. Verify authentication and try again. |
403 Forbidden | Unauthorized |
Response
Body Structure (200)
Expand all
id string | |
accessToken string | The access token |
vaultInformation object | Vault object.Contains information about the Knowledge Vault. |
name string | The name of the Knowledge Vault. This is also the name of the database. |
id string | A unique identifier for the Knowledge Vault. |
url string | The relative URL to access this object. |
userInformation object | User object. |
id string | A unique number that the Vault uses to reference the user. |
name string | The login name of the user. |
email string | The email address of the user. |
authTypes object | The type of account to retrieve. Allowed values are ActiveDirectory, Vault, and Autodesk.
Possible values: ActiveDirectory , Vault , Autodesk |
systemName string | |
createDate datetime: ISO 8601 | The date that the user was created. |
isActive string | Is the user active |
url string | The relative URL to access this object. |
Example
This example illustrates how to get current session.
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/sessions/@current' \
-X 'GET' \
-H 'Accept: application/json'\
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a...'
Response
{
"id": "cae23e71-697f-411f-b404-3c235ba82c55",
"accessToken": "V:cae23e71-697f-411f-b404-3c235ba82c55",
"createDate": "2024-10-21T09:01:37.9817775Z",
"vaultInformation": {
"id": "117",
"name": "Vault",
"url": "/AutodeskDM/Services/api/vault/v2/vaults/117"
},
"userInformation": {
"id": "65",
"name": "TestAccount",
"email": "VaultAPITest@outlook.com",
"authTypes": "Vault, Autodesk",
"createDate": "2024-06-27T06:29:20.183Z",
"isActive": true,
"url": "/AutodeskDM/Services/api/vault/v2/users/65"
},
"url": "/AutodeskDM/Services/api/vault/v2/sessions/cae23e71-697f-411f-b404-3c235ba82c55"
}
Show More