GET
contexts
Get a list of contexts that can be accessed.
Resource Information
Method and URI | GET https://developer.api.autodesk.com/insights/v1/contexts |
Required OAuth Scopes | data:read |
Data Format | JSON |
Request
Headers
Authorization* string | Must be Bearer <token> , where <token> is obtained via a three-legged OAuth flow. |
* Required
Request
Response
HTTP Status Code Summary
200 OK | Request succeeded. |
401 Unauthorized | The provided bearer token is not valid. |
403 Forbidden | The user or service represented by the bearer token does not have permission to perform this operation. |
500 Internal Server Error | An unknown error occurred on the server. |
Response
Body Structure (200)
Successful requests will return a JSON array, with each element in the array representing a context/team.
contextId string | Context(Team) Id |
alias string | Context(Team) name/alias |
reportingBenefits enum:array | List of reporting benefits available for this context
|
Example
Successful listing all available contexts. (200)
Request
curl -X GET \
'https://developer.api.autodesk.com/insights/v1/contexts' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1N'
Response
[
{
"contextId": "4865648",
"alias": "New York Office",
"reportingBenefits": [
"ReportingAPIAccess",
"ReportingAdvanced",
"ReportingFlexUsage",
"ReportingSeatUsage",
"InsightsTeam"
]
},
{
"contextId": "4865647",
"alias": "Team Omega",
"reportingBenefits": [
"ReportingFlexUsage",
"ReportingSeatUsage",
"InsightsTeam"
]
},
{
"contextId": "4901486",
"alias": "Remote Team",
"reportingBenefits": [
"ReportingFlexUsage",
"InsightsTeam"
]
}
]
Show More
Example
Unauthorized. (401)
Request
curl -X GET \
'https://developer.api.autodesk.com/insights/v1/contexts' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1N'
Response
{
"developerMessage": "Access token provided is invalid or expired.",
"moreInfo": "https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling/",
"errorCode": "AUTH-006"
}