Changed Elements
Download API definition:
This API is a Technical Preview and is available for testing purposes only. Do not use in production.
get https://qa-api.bentley.com/changedelements/diff?iTwinId&iModelId[&startChangesetIndex][&endChangesetIndex][&diffingStrategy]

Returns a lightweight list of diff jobs for the specified iModel. Each entry contains identifiers, job options, and status, however, they won't contain the job results. Use the single-job GET endpoint to retrieve job results. Results can be filtered by startChangesetIndex, endChangesetIndex, and/or diffingStrategy.

Request parameters

Name
Required?
Description
iTwinId
Yes
iModelId
Yes
startChangesetIndex
No

Optional. When provided, only jobs whose startChangesetIndex equals this value are returned. Must be >= 0.

endChangesetIndex
No

Optional. When provided, only jobs whose endChangesetIndex equals this value are returned. Must be >= 0.

diffingStrategy
No

Optional. When provided, only jobs whose diffingStrategy matches this value (case-insensitive) are returned. Accepted values: "Basic", "VersionCompare", "Full".

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

Setting to application/vnd.bentley.itwin-platform.v3+json is recommended.

Response 200 OK

List of diff jobs.

json
{
    "jobs": [{
        "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "status": "Completed",
        "diffingStrategy": "basic",
        "iTwinId": "a1b2c3d4-0000-0000-0000-000000000000",
        "iModelId": "b2c3d4e5-0000-0000-0000-000000000000",
        "startChangesetIndex": 0,
        "endChangesetIndex": 10
    }]
}

Response 400 Bad Request

Invalid iTwinId or iModelId.

json
{
    "error": {
        "code": "InvalidChangedElementsRequest",
        "message": "One or more request parameters are invalid.",
        "details": [{
            "code": "InvalidParameter",
            "message": "'iTwinId' is not a valid GUID.",
            "target": "iTwinId"
        }]
    }
}

Response 401 Unauthorized

This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.

json
{
    "error": {
        "code": "HeaderNotFound",
        "message": "Header Authorization was not found in the request. Access denied."
    }
}

Response 404 Not Found

iTwin or iModel not found.

json
{
    "error": {
        "code": "DiffJobNotFound",
        "message": "Requested DiffJob is not available."
    }
}

Response 429 Too many requests

This response indicates that the client sent more requests than allowed by this API for the current tier of the client.

json
{
    "error": {
        "code": "RateLimitExceeded",
        "message": "The client sent more requests than allowed by this API for the current tier of the client."
    }
}

Response headers

Name
Description
retry-after

Number of seconds to wait until client is allowed to make more requests.

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

target
String, null

The target of the error.

message
String

A human-readable representation of the error.

Error Response

Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.

Name
Type
Description
error

Error information.

DiffJobSummary

Name
Type
Description
jobId
String, null
status
String, null
iTwinId
String, null
iModelId
String, null
diffingStrategy
String, null
endChangesetIndex
Int32
startChangesetIndex
Int32

DiffJobListResponse

Name
Type
Description
jobs

Was this page helpful?