Changed Elements
This API is a Technical Preview and is available for testing purposes only. Do not use in production.
GET https://api.bentley.com/changedelements/diff/{jobId}?iTwinId={iTwinId}&iModelId={iModelId}

Returns the current status of a diff job. When status is Completed, the response includes href — a presigned Azure SAS URL to the results blob. When status is Failed, the response includes a structured error object with a curated code/message describing the failure category.

Request parameters

Name
Required?
Description
jobId
Yes
iTwinId
Yes
iModelId
Yes

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

Diff job status and details.

json
{
    "job": {
        "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "status": "Completed",
        "iTwinId": "a1b2c3d4-0000-0000-0000-000000000000",
        "iModelId": "b2c3d4e5-0000-0000-0000-000000000000",
        "startChangesetIndex": 1,
        "endChangesetIndex": 10,
        "startChangesetId": "8e440d1976079e5b090cbb2637d1b23bd42a6a45",
        "endChangesetId": "f2a29e37b8e60d3f30b9df2f9f5c0c6a6e70c1a3",
        "diffingPlan": {
            "strategy": "Basic"
        },
        "href": "https://example.blob.core.windows.net/results.json?sv=..."
    }
}

Response 400 Bad Request

Invalid jobId, 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

Diff job, 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.

message
String

A human-readable representation of the error.

target
String, null

The target 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

PipelineStep

A single step in a diffing pipeline. Either a generic step with a name and optional config, or a strategy reference.

DiffingOutputConfig

Name
Type
Description
format
String, null

Output format identifier.

idEncoding
String, null

Optional element id encoding in output. Accepted values: "hex" or "decimal" (case-insensitive).

renameFields
Object, null

Field renaming map. Keys are original field names, values are the desired output names.

keepFields
String[], null

List of field names to include in the output. Mutually exclusive with 'dropFields'.

dropFields
String[], null

List of field names to exclude from the output. Mutually exclusive with 'keepFields'.

DiffingPlan

Name
Type
Description
strategy
String, null

Diffing strategy to apply. Accepted values: "Basic", "VersionCompare", "Full" (case-insensitive). Mutually exclusive with 'pipeline'.

pipeline
PipelineStep[], null

Ordered list of pipeline processing steps. Mutually exclusive with 'strategy'.

DiffError

Name
Type
Description
code
String, null
message
String, null

DiffJob

Name
Type
Description
jobId
String, null

Unique identifier for this diff job.

status
String, null

Current job status: Queued, Started, Completed, or Failed.

iTwinId
String, null

GUID of the iTwin that owns the iModel.

iModelId
String, null

GUID of the iModel being diffed.

startChangesetIndex
Int32

1-based index of the starting changeset (inclusive).

endChangesetIndex
Int32

1-based index of the ending changeset (inclusive).

startChangesetId
String, null

Canonical Id of the starting changeset (inclusive).

endChangesetId
String, null

Canonical Id of the ending changeset (inclusive).

diffingPlan
href
String, null

Presigned Azure SAS URL to the results blob. Present only when status is Completed.

completedAgents
Int32, null

Number of agent jobs that have finished processing.

totalAgents
Int32, null

Total number of agent jobs for this diff.

DiffJobResponse

Response wrapper containing a single V3 diff job.

Name
Type
Description

Was this page helpful?