Request

Response

    Diff
    POST

    projects/:projectId/diffs/:diffId/queries

    Applies the given query to the given properties index.

    Note that this endpoint is compatible with both BIM 360 and Autodesk Construction Cloud (ACC) projects.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/construction/index/v2/projects/:projectId/diffs/:diffId/queries
    Authentication Context
    user context required
    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.
    Content-Type*
    string
    Must be application/json.
    x-ads-force-regenerate-cache
    boolean
    If set to true, force regeneration of S3 cache.
    x-ads-region
    enum: string
    The region to which your request should be routed. If not set, the request is routed automatically but may incur a small latency increase.

    Possible values: US, EMEA. For the full list of supported regions, see the Regions page.

    * Required

    Request

    URI Parameters

    projectId
    string: UUID
    The project ID.
    diffId
    string
    The diff ID.

    Request

    Body Structure

    Response

    HTTP Status Code Summary

    200
    OK
    Success
    401
    Unauthorized
    Response in case of an error.
    403
    Forbidden
    The user or service represented by the bearer token does not have permission to perform this operation.
    415
    Unsupported Media Type
    The Content-Type header must be application/json.
    429
    Too Many Requests
    Rate limit exceeded. Wait some time before retrying. The Retry-After header might provide the amount of the time to wait.
    500
    Internal Server Error
    An unknown error occurred on the server.

    Response

    Body Structure (200)

    Expand all
    projectId
    string
    project id.
    diffId
    string
    diff id.
    queryId
    string
    query id.
    type
    enum: string
    type.

    Possible values: DIFF

    state
    enum: string
    job status.

    Possible values: PROCESSING, FINISHED, FAILED

    selfUrl
    string
    unique url for this job status.
    prevVersionUrns
    array: string
    The previous file versions used in this index.
    curVersionUrns
    array: string
    The current file versions used in this index.
    updatedAt
    datetime: ISO 8601
    timestamp.
    retryAt
    datetime: ISO 8601
    timestamp.
    stats
    object
    some higher level diff statistics.
    added
    int
    number of objects added.
    removed
    int
    number of objects removed.
    modified
    int
    number of objects modified.
    manifestUrl
    string
    url for downloading the diff manifest.
    fieldsUrl
    string
    url for downloading the diff fields.
    propertiesUrl
    string
    url for downloading the diff properties.
    queryResultsUrl
    string
    url for downloading the query result.
    errors
    array: object
    errors.
    type
    string
    The error code.
    title
    string
    A short title for the error.
    detail
    string
    A more detailed, human readable description of the error, assuming that this message is not localized and is therefore EN-US. UI consumers can use the error.type value to provide a localized version of this error for presentation.
    errors
    array: object
    A set of specific validation errors that need to be fixed.
    field
    string
    The field which failed validation.
    title
    string
    A short title for the error.
    detail
    string
    A more detailed, human readable description of the error, assuming that this message is not localized and is therefore EN-US. UI consumers can use the error.type value to provide a localized version of this error for presentation.
    type
    string
    The error code.

    Response

    Body Structure (401)

    Expand all
    type
    string
    The error code.
    title
    string
    A short title for the error.
    detail
    string
    A more detailed, human readable description of the error, assuming that this message is not localized and is therefore EN-US. UI consumers can use the error.type value to provide a localized version of this error for presentation.
    errors
    array: object
    A set of specific validation errors that need to be fixed.
    field
    string
    The field which failed validation.
    title
    string
    A short title for the error.
    detail
    string
    A more detailed, human readable description of the error, assuming that this message is not localized and is therefore EN-US. UI consumers can use the error.type value to provide a localized version of this error for presentation.
    type
    string
    The error code.

    Example

    Request

    curl -v 'https://developer.api.autodesk.com/construction/index/v2/projects/cd743656-f130-48bd-96e6-948175313637/diffs/3fe13864aecfe0a5/queries' \
         -X POST \
         -H 'Authorization: Bearer <token>' \
         -H 'Content-Type: application/json' \
         -d '{
               "query": {
                 " $not ": [
                   {
                     " s.p123 ": "17"
                   },
                   {
                     " s.pabc ": " '\''Hello'\'' "
                   }
                 ]
               },
               "columns": {
                 "a": {
                   "$date_add": [
                     "YEAR",
                     "5",
                     "'\''2010-01-01T'\''"
                   ]
                 },
                 "b": {
                   "$mul": [
                     {
                       "$add": [
                         "5",
                         "s.p789"
                       ]
                     },
                     "10"
                   ]
                 },
                 "s.svf2Id": "true"
               }
             }'
    
    Show More

    Response (200)

    {
      "projectId": "some_project_id",
      "diffId": "fe34bb65aeef",
      "queryId": "4af40764ae14",
      "type": "DIFF",
      "selfUrl": "https://developer.api.autodesk.com/construction/index/v2/projects/some_project_id/diffs/fe34bb65aeef/queries/4af40764ae14",
      "prevVersionUrns": [
        "some_version_urn_1"
      ],
      "curVersionUrns": [
        "some_version_urn_2"
      ],
      "updatedAt": "2020-09-18T07:44:04.946Z",
      "state": "FINISHED",
      "stats": {
        "added": "15",
        "removed": "10",
        "modified": "42"
      },
      "manifestUrl": "https://developer.api.autodesk.com/construction/index/v2/projects/some_project_id/diffs/fe34bb65aeef/manifest",
      "fieldsUrl": "https://developer.api.autodesk.com/construction/index/v2/projects/some_project_id/diffs/fe34bb65aeef/fields",
      "propertiesUrl": "https://developer.api.autodesk.com/construction/index/v2/projects/some_project_id/diffs/fe34bb65aeef/properties",
      "queryResultsUrl": "https://developer.api.autodesk.com/construction/index/v2/projects/some_project_id/diffs/fe34bb65aeef/queries/4af40764ae14/properties"
    }
    
    Show More

    Response (401)

    {
      "type": "BadInput",
      "title": "One or more input values in the request were bad",
      "detail": "The following parameters are invalid: containerId",
      "errors": [
        {
          "field": "containerId",
          "title": "Invalid parameter",
          "detail": "The value 'testing' is not valid.",
          "type": "BadInput"
        }
      ]
    }
    
    Show More
     
    ______
    icon-svg-close-thick

    Cookie preferences

    Your privacy is important to us and so is an optimal experience. To help us customize information and build applications, we collect data about your use of this site.

    May we collect and use your data?

    Learn more about the Third Party Services we use and our Privacy Statement.

    Strictly necessary – required for our site to work and to provide services to you

    These cookies allow us to record your preferences or login information, respond to your requests or fulfill items in your shopping cart.

    Improve your experience – allows us to show you what is relevant to you

    These cookies enable us to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we use to deliver information and experiences tailored to you. If you do not allow these cookies, some or all of these services may not be available for you.

    Customize your advertising – permits us to offer targeted advertising to you

    These cookies collect data about you based on your activities and interests in order to show you relevant ads and to track effectiveness. By collecting this data, the ads you see will be more tailored to your interests. If you do not allow these cookies, you will experience less targeted advertising.

    icon-svg-close-thick

    THIRD PARTY SERVICES

    Learn more about the Third-Party Services we use in each category, and how we use the data we collect from you online.

    icon-svg-hide-thick

    icon-svg-show-thick

    Strictly necessary – required for our site to work and to provide services to you

    Qualtrics
    W
    Akamai mPulse
    W
    Digital River
    W
    Dynatrace
    W
    Khoros
    W
    Launch Darkly
    W
    New Relic
    W
    Salesforce Live Agent
    W
    Wistia
    W
    Tealium
    W
    Upsellit
    W
    CJ Affiliates
    W
    Commission Factory
    W
    Google Analytics (Strictly Necessary)
    W
    Typepad Stats
    W
    Geo Targetly
    W
    SpeedCurve
    W
    Qualified
    #

    icon-svg-hide-thick

    icon-svg-show-thick

    Improve your experience – allows us to show you what is relevant to you

    Google Optimize
    W
    ClickTale
    W
    OneSignal
    W
    Optimizely
    W
    Amplitude
    W
    Snowplow
    W
    UserVoice
    W
    Clearbit
    #
    YouTube
    #

    icon-svg-hide-thick

    icon-svg-show-thick

    Customize your advertising – permits us to offer targeted advertising to you

    Adobe Analytics
    W
    Google Analytics (Web Analytics)
    W
    AdWords
    W
    Marketo
    W
    Doubleclick
    W
    HubSpot
    W
    Twitter
    W
    Facebook
    W
    LinkedIn
    W
    Yahoo! Japan
    W
    Naver
    W
    Quantcast
    W
    Call Tracking
    W
    Wunderkind
    W
    ADC Media
    W
    AgrantSEM
    W
    Bidtellect
    W
    Bing
    W
    G2Crowd
    W
    NMPI Display
    W
    VK
    W
    Adobe Target
    W
    Google Analytics (Advertising)
    W
    Trendkite
    W
    Hotjar
    W
    6 Sense
    W
    Terminus
    W
    StackAdapt
    W
    The Trade Desk
    W
    RollWorks
    W

    Are you sure you want a less customized experience?

    We can access your data only if you select "yes" for the categories on the previous screen. This lets us tailor our marketing so that it's more relevant for you. You can change your settings at any time by visiting our privacy statement

    Your experience. Your choice.

    We care about your privacy. The data we collect helps us understand how you use our products, what information you might be interested in, and what we can improve to make your engagement with Autodesk more rewarding.

    May we collect and use your data to tailor your experience?

    Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.