Request

Response

    POST

    modeldata/{modelID}/scan

    Returns an array of elements (including attribute values) matching your query. First element of the returned array is schema version (e.g. “v1”). Each element (starting from the position [1]) will contain at least one well known key: “k”, which represents a fully-qualified element ID. Each other key is pointing to the attribute definition that has to be fetched separately. Knowing the attribute definition will help the caller to parse the attribute value properly.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/tandem/v1/modeldata/{modelID}/scan
    Authentication Context
    user context optional
    Required OAuth Scopes
    data:read
    Data Format
    JSON

    Request

    Headers

    Authorization*
    string
    Must be Bearer <token>, where <token> is obtained via either a two-legged or three-legged OAuth flow.
    Region
    string
    Specifies the region where your request should be routed. Possible values: US, EMEA. For more details, see Regions.
    Content-Type*
    string
    Must be application/json
    * Required

    Request

    URI Parameters

    modelID
    string
    Model URN you want to run your query for

    Request

    Body Structure

    A query indicating what data you are interested in

    columns
    array: string
    Optional array of columns to query.
    families
    array: string
    Optional array of property families to query.
    includeDeleted
    boolean
    Controls if deleted elements are included in response.
    includeEmpty
    boolean
    Controls if empty rows are included in response.
    includeFragmentCount
    boolean
    Controls if information about number of fragments is included in response.
    includeHistory
    boolean
    Controls if history information is included in response.
    keys
    array: string
    Optional array of keys to query.
    qualifiedColumns
    array: string
    Optional array of property ids to query.
    skipArrays
    boolean
    don’t wrap values in arrays when IncludeHistory is false

    Response

    HTTP Status Code Summary

    200
    OK
    OK
    400
    Bad Request
    The service was unable to process the request. The syntax of the request may be malformed or the request may be missing a required header. Do not resend the request without fixing the issue. The response body may indicate what is wrong with the request.
    403
    Forbidden
    The request was successfully validated but it did not have the required permissions.

    Response

    Body Structure (200)

    Expand all
    results
    array
    oneOf
    array:oneOf
    0
    string
    Specifies schema version of the response.
    1
    object
    k
    string
    Unique key of the element.
    *
    string
    Name/value map of properties. Name is an id of property.
    2
    object
    k
    string
    Unique key of the element.
    *
    array
    Name/value of properties. Name is an id of property. The value is array of values and timestamps.
    oneOf
    array:oneOf
    0
    string
    Property value.
    1
    number
    Timestamp when property was modified.

    Example 1

    Get all properties from a given element, without history. To get the values for multiple elements, simply include their keys in the keys array.

    curl -v 'https://developer.api.autodesk.com/api/v1/modeldata/urn:adsk.dtm:d5eZt_XtRzqUHT93-vNZxw/scan' \
      -X 'POST' \
      -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsIm....' \
      -H 'Content-Type: application/json' \
      -d '{
        "families": [
            "n",
            "l",
            "x",
            "r",
            "z"
        ],
        "includeHistory": false,
        "keys": [
            "AAAAAN6kaKZBIkMpkzR6Jp_QiuIACv1s"
        ]
      }'
    
    Show More

    Response

    [
        "v1",
        {
            "k": "ricOExIyRIyTke1_49OlKgAD-WQ",
            "l:l": [
                "kzxKBpO4EdOA-ADAT478MgAAAB4"
            ],
            "l:m": [
                "KEecOwAQRgC44ntF5eaV1QACU-Y"
            ],
            "l:t": [
                "eSelem67SMmRIHH6JgautgAD7RM"
            ],
            "l:!l": [
                "8KBjb_ZrSO6bBWAxWYViCgAKpgk"
            ],
            "n:a": [
                0
            ],
            "n:c": [
                11
            ],
            "n:n": [
                "Basic Wall"
            ],
            "n:u": [
                "B2010156"
            ],
            "n:!v": [
                "EF_25_10"
            ],
            "n:!n": [
                "Test Wall"
            ],
            "r:-gE": [
                0
            ],
            "r:1AE": [
                0
            ],
            "r:1AM": [
                4145.164591038102
            ],
            "r:3gE": [
                0
            ],
            "r:3wY": [
                "BLDG 4 - EastWall - Ground to Roof"
            ],
            "r:6AI": [
                "Revit Walls"
            ],
            "r:7gI": [
                "Bearing"
            ],
            "r:7gQ": [
                ""
            ],
            "r:9gI": [
                0
            ],
            "r:9wY": [
                "Up to level: T.O. ROOF BLDG 4"
            ],
            "r:PA": [
                "Finish Face: Exterior"
            ],
            "r:UA": [
                "None"
            ],
            "r:Zw": [
                "260452"
            ],
            "r:_gI": [
                -2000011
            ],
            "r:eg": [
                ""
            ],
            "r:iQY": [
                "Rebar Cover 1 <0' - 1\">"
            ],
            "r:kgI": [
                0
            ],
            "r:lgY": [
                "Rebar Cover 1 <0' - 1\">"
            ],
            "r:nQU": [
                ""
            ],
            "r:ngI": [
                1
            ],
            "r:owI": [
                "Vertical"
            ],
            "r:qwM": [
                1
            ],
            "r:sAM": [
                "Rebar Cover 1 <0' - 1\">"
            ],
            "r:sAU": [
                3454.3038258651127
            ],
            "r:sgE": [
                80.31693606751301
            ],
            "r:tQE": [
                0
            ],
            "r:tQQ": [
                "All-Ground Level"
            ],
            "r:twE": [
                0
            ],
            "r:vAQ": [
                ""
            ],
            "r:xQE": [
                1
            ],
            "r:xgQ": [
                51.583333333333336
            ],
            "r:yQU": [
                "New Construction"
            ],
            "z:5Ac": [
                "value 9876"
            ],
            "z:6gc": [
                "Test Value 1"
            ],
            "z:4Qc": [
                123
            ],
            "z:3wc": [
                "New DEV TEST"
            ]
        }
    ]
    
    Show More

    Example 2

    Get all user-defined properties from a given element, include history

    curl -v 'https://developer.api.autodesk.com/api/v1/modeldata/urn:adsk.dtm:d5eZt_XtRzqUHT93-vNZxw/scan' \
      -X 'POST' \
      -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsIm....' \
      -H 'Content-Type: application/json' \
      -d '{
        "families": [
            "z"
        ],
        "includeHistory": true,
        "keys": [
            "AAAAAN6kaKZBIkMpkzR6Jp_QiuIACv1s"
        ]
      }'
    
    Show More

    Response

    [
        "v1",
        {
            "k": "ricOExIyRIyTke1_49OlKgAD-WQ",
            "z:5Ac": [
                "value 9876",
                1674160465908,
                "value 1234",
                1674159089299,
                "MaxAsset_TBD",
                1674158373580
            ],
            "z:6gc": [
                "Test Value 1",
                1691516985971,
                "Test value",
                1680628011953
            ],
            "z:4Qc": [
                125,
                1692838880553,
                124,
                1692838835992,
                123,
                1692836935090,
                122,
            ],
        }
    ]
    
    Show More

    Example 3

    Get all elements with a specific, qualified property

    curl -v 'https://developer.api.autodesk.com/api/v1/modeldata/urn:adsk.dtm:d5eZt_XtRzqUHT93-vNZxw/scan' \
      -X 'POST' \
      -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsIm....' \
      -H 'Content-Type: application/json' \
      -d '{
          "qualifiedColumns": [
              "z:5Ac"
          ],
          "includeHistory": false
       }'
    
    Show More

    Response

    [
      "v1",
      {
          "k": "AKj0KDODTcyzbALnarH4wAAHlnk",
          "z:5Ac": [
              "2184"
          ]
      },
      {
          "k": "ricOExIyRIyTke1_49OlKgAD-WQ",
          "z:5Ac": [
              "value 9876"
          ]
      },
      {
          "k": "_0VkAOU5Te-hmAoPZfSahwAIb7Y",
          "z:5Ac": [
              "2191"
          ]
      }
    ]
    
    Show More

    Example 4

    Get all change history for a specific element

    curl -v 'https://developer.api.autodesk.com/api/v1/modeldata/urn:adsk.dtm:d5eZt_XtRzqUHT93-vNZxw/scan' \
      -X 'POST' \
      -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsIm....' \
      -H 'Content-Type: application/json' \
      -d '{
          "qualifiedColumns": [
              "z:5Ac"
          ],
          "includeHistory": true
      }'
    
    Show More

    Response

    [
      "v1",
      {
          "k": "ricOExIyRIyTke1_49OlKgAD-WQ",
          "n:a": [
              0,
              1653517319504
          ],
          "n:c": [
              11,
              1653517319504
          ],
          "n:n": [
              "Basic Wall",
              1653517319504
          ],
          "n:u": [
              "B2010156",
              1653517319504
          ],
          "n:!v": [
              "EF_25_10",
              1673999490440,
              "03 00 00",
              1653602646661
          ],
          "n:!n": [
              "Test Wall",
              1692148797391,
              "Overridden Name 1",
              1691531748088,
              "Test Wall",
              1690532959252,
              "TEST UPDATE RKH",
              1690532864603,
              "Test Wall",
              1690508913935,
              "Go Giants",
              1688968897726,
              "Go 49ers",
              1688968524888,
              "Go Warriors",
              1671585207218
          ]
      }
    ]
    
    Show More

    Example 5

    There is another flag you can use when you only want the latest value and not the full history of each property. If skipArrays=true it will return a “flat” list of property/value pairs which can be easier to parse. The following example shows the retuned structure if more than one elementKey is specified.

    curl -v 'https://developer.api.autodesk.com/api/v1/modeldata/urn:adsk.dtm:d5eZt_XtRzqUHT93-vNZxw/scan' \
      -X 'POST' \
      -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsIm....' \
      -H 'Content-Type: application/json' \
      -d '{
              "families": [
                  "n",
                  "l",
                  "x",
                  "r",
                  "z"
              ],
              "skipArrays": true,
              "keys": [
                  "AAAAAK4nDhMSMkSMk5Htf-PTpSoAA_lk",
                  "AAAAALTj0BsGP0mvp_AvNGPcdscADJ4Q"
              ]
          }'
    
    Show More

    Response

    [
        "v1",
        {
            "k": "ricOExIyRIyTke1_49OlKgAD-WQ",
            "z:5Ac": "value 9876",
            "z:6gc": "Test Value 1",
            "z:4Qc": 123,
            "z:3wc": "New DEV TEST",
            "l:l": "kzxKBpO4EdOA-ADAT478MgAAAB4",
            "l:m": "KEecOwAQRgC44ntF5eaV1QACU-Y",
            "l:t": "eSelem67SMmRIHH6JgautgAD7RM",
            "l:!l": "8KBjb_ZrSO6bBWAxWYViCgAKpgk",
            "n:a": 0,
            "n:c": 11,
            "n:n": "Basic Wall",
            "n:u": "B2010156",
            "n:!v": "EF_25_10",
            "n:!n": "RandomName_113",
            "r:-gE": 0,
            "r:1AE": 0,
            "r:1AM": 4145.164591038102,
            "r:3gE": 0,
            "r:3wY": "BLDG 4 - EastWall - Ground to Roof",
            "r:6AI": "Revit Walls",
            "r:7gI": "Bearing",
            "r:7gQ": "",
            "r:9gI": 0,
            "r:9wY": "Up to level: T.O. ROOF BLDG 4",
            "r:PA": "Finish Face: Exterior",
            "r:UA": "None",
            "r:Zw": "260452",
            "r:_gI": -2000011,
            "r:eg": "",
            "r:iQY": "Rebar Cover 1 <0' - 1\">",
            "r:kgI": 0,
            "r:lgY": "Rebar Cover 1 <0' - 1\">",
            "r:nQU": "",
            "r:ngI": 1,
            "r:owI": "Vertical",
            "r:qwM": 1,
            "r:sAM": "Rebar Cover 1 <0' - 1\">",
            "r:sAU": 3454.3038258651127,
            "r:sgE": 80.31693606751301,
            "r:tQE": 0,
            "r:tQQ": "All-Ground Level",
            "r:twE": 0,
            "r:vAQ": "",
            "r:xQE": 1,
            "r:xgQ": 51.583333333333336,
            "r:yQU": "New Construction"
        },
        {
            "k": "tOPQGwY_Sa-n8C80Y9x2xwAMnhA",
            "l:l": "cvVSKES5RoGjk7PfDYeD2gACRI4",
            "l:t": "Pg4qlRACRHGZxjQhKkpU7gAIWp8",
            "l:r": "",
            "n:a": 0,
            "n:c": 32,
            "n:n": "Floor",
            "n:u": "B1010",
            "n:!v": "Pr_80_51",
            "r:1AM": 1556.8212775047646,
            "r:3wY": "210 King - Roof Deck - Wood Joist 10\" - Wood finish",
            "r:5gY": 294.58621647852954,
            "r:6AI": "Revit Floors",
            "r:7gQ": "",
            "r:UA": "None",
            "r:Wg": 0.8333333333333334,
            "r:Zw": "826896",
            "r:_AE": 54.95833333333333,
            "r:_gI": -2000032,
            "r:eg": "",
            "r:nQE": "BLDG. 1,2,3- LEVEL 5 FLR. FIN.",
            "r:ngI": 0,
            "r:ngc": 0,
            "r:pgQ": 55.791666666666664,
            "r:qwM": 0,
            "r:sAU": 1297.351064587307,
            "r:tQE": 0,
            "r:uAQ": 0,
            "r:vAQ": "",
            "r:xQE": 1,
            "r:yQU": "New Construction",
            "x:r": ""
        }
    ]
    
    Show More