Request

Response

    GET

    /usage-queries/:queryId

    Retrieve query status and results.

    Resource Information

    Method and URI
    GET
    https://developer.api.autodesk.com/insights/v1/usage-queries/:queryId
    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.
    Accept-Language
    string
    For Excel output, specifies the language used to localize worksheet names. For other output formats this parameter is not currently used. en-US: (example)
    * Required

    Request

    Path Parameters

    queryId
    string
    Limits the results to the specified queryId.

    Request

    URI Parameters

    limit
    integer
    For paging through results, this is the number of results that will be returned. Defaults to 100.
    offset
    integer
    For paging through results, this is the first result that will be returned. Defaults to 0.

    Response

    HTTP Status Code Summary

    200
    OK
    Request succeeded.
    400
    Bad Request
    The API request was invalid/improper/etc.
    401
    Unauthorized
    The API request was not authenticated.

    Response

    Body Structure (200)

    pagination
    object
    pagination.pagination[i].totalResults
    integer
    Total number of records available.
    pagination.pagination[i].offset
    integer
    Offset (from zero) representing the start of the current result set.
    pagination.pagination[i].limit
    integer
    Number of results in the current result set.
    id
    string
    Unique identifier for this query.
    status
    string
    Status of the query. Possible values: SUBMITTED, RUNNING, COMPLETED, EXPIRED, ERROR
    columns
    array of strings
    Array of column names (which can be both Fields and/or Metrics) returned in the results.
    rows
    array of strings
    The query results, in the same order as result.columns.

    columns and rows can be any values from Fields and Metrics.

    Example

    OK (200). Successful processing request.

    Request

    curl  -X GET \
          'https://developer.api.autodesk.com/insights/v1/usage-queries/6162f82d13b04dae36251a1dd78c790aedb99a75be4776f4871db117f344108d?offset=0&limit=100' \
          -H 'Content-Type: application/json' \
          -H 'Authorization: Bearer eyJhbGciOiJIUzI1N'
    

    Response

    {
      "id": "6162f82d13b04dae36251a1dd78c790aedb99a75be4776f4871db117f344108d",
      "status": "COMPLETED",
      "columns": [
          "productName",
          "uniqueUsers"
      ],
      "pagination": {
          "totalResults": 5,
          "offset": 0,
          "limit": 100
      },
      "rows": [
          [
              "3ds Max",
              1
          ],
          [
              "AutoCAD",
              2
          ],
          [
              "AutoCAD Electrical",
              2
          ],
          [
              "Maya",
              1
          ],
          [
              "Product Design & Manufacturing Collection",
              3
          ]
      ]
    }
    
    Show More

    Example

    OK (200). With Error in the request processing.

    Request

    curl  -X GET \
          'https://developer.api.autodesk.com/insights/v1/usage-queries/8ff2510db9d1a2d4e9e35cedace73502127cde22e37417316565a5350704f4a2?offset=0&limit=100' \
          -H 'Content-Type: application/json' \
          -H 'Authorization: Bearer eyJhbGciOiJIUzI1N'
    

    Response

    {
      "id": "8ff2510db9d1a2d4e9e35cedace73502127cde22e37417316565a5350704f4a2",
      "status": "ERROR"
    }
    

    Example

    Forbidden (403)

    Request

    curl  -X GET \
          'https://developer.api.autodesk.com/insights/v1/usage-queries/8ff2510db9d1a2d4e9e35cedace73502127cde22e37417316565a5350704f4a2?offset=0&limit=100' \
          -H 'Content-Type: application/json' \
          -H 'Authorization: Bearer eyJhbGciOiJIUzI1N'
    

    Response

    {
      "title": "ACCESS_DENIED",
      "detail": "No further detail provided"
    }