Queues a new diff job for the specified iModel changeset range using either a named diffing strategy or a custom diffing pipeline. Returns 409 if a job with identical parameters already exists. Delete the existing job first to retry.
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v3+json is recommended.
Diff job creation payload.
Request body
CreateDiffJobRequest
GUID of the iTwin that owns the iModel.
GUID of the iModel to diff.
A 1-based starting changeset index (inclusive).
A 1-based ending changeset index (inclusive).
Example
{ "iTwinId": "a1b2c3d4-0000-0000-0000-000000000000", "iModelId": "b2c3d4e5-0000-0000-0000-000000000000", "startChangeset": 1, "endChangeset": 10, "diffingPlan": { "strategy": "Basic" } }
Response 202 Accepted
Diff job created and queued.
{ "job": { "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "Queued", "iTwinId": "a1b2c3d4-0000-0000-0000-000000000000", "iModelId": "b2c3d4e5-0000-0000-0000-000000000000", "startChangesetIndex": 1, "endChangesetIndex": 10, "startChangesetId": "8e440d1976079e5b090cbb2637d1b23bd42a6a45", "endChangesetId": "f2a29e37b8e60d3f30b9df2f9f5c0c6a6e70c1a3", "diffingPlan": { "strategy": "Basic" } } }
Response 400 Bad Request
Invalid request parameters or index range.
{ "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.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 403 Forbidden
Caller does not have read access to the iTwin or iModel.
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 404 Not Found
iTwin, iModel, or one of the changeset indices was not found.
{ "error": { "code": "DiffJobNotFound", "message": "Requested DiffJob is not available." } }
Response 409 Conflict
A job with identical parameters already exists. Delete the existing job to retry.
{ "error": { "code": "DiffJobExists", "message": "A diff job with identical parameters already exists. Delete the existing job to retry." } }
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.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
Error
Contains error information.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "required": [ "code", "message" ], "type": "object", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true } }, "description": "Contains error information." }
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.
{ "title": "Error Response", "required": [ "error" ], "type": "object", "properties": { "error": { "$ref": "#/components/schemas/Error" } }, "additionalProperties": false, "description": "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." }
ChangesetReference
PipelineStep
A single step in a diffing pipeline. Either a generic step with a name and optional config, or a strategy reference.
DiffingOutputConfig
Output format identifier.
Optional element id encoding in output. Accepted values: "hex" or "decimal" (case-insensitive).
Field renaming map. Keys are original field names, values are the desired output names.
List of field names to include in the output. Mutually exclusive with 'dropFields'.
List of field names to exclude from the output. Mutually exclusive with 'keepFields'.
{ "title": "DiffingOutputConfig", "type": "object", "properties": { "format": { "type": "string", "description": "Output format identifier.", "nullable": true }, "idEncoding": { "type": "string", "description": "Optional element id encoding in output. Accepted values: \"hex\" or \"decimal\" (case-insensitive).", "nullable": true }, "renameFields": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Field renaming map. Keys are original field names, values are the desired output names.", "nullable": true }, "keepFields": { "type": "array", "items": { "type": "string" }, "description": "List of field names to include in the output. Mutually exclusive with 'dropFields'.", "nullable": true }, "dropFields": { "type": "array", "items": { "type": "string" }, "description": "List of field names to exclude from the output. Mutually exclusive with 'keepFields'.", "nullable": true } }, "additionalProperties": false }
DiffingPlan
Diffing strategy to apply. Accepted values: "Basic", "VersionCompare", "Full" (case-insensitive). Mutually exclusive with 'pipeline'.
Ordered list of pipeline processing steps. Mutually exclusive with 'strategy'.
{ "title": "DiffingPlan", "type": "object", "properties": { "strategy": { "type": "string", "description": "Diffing strategy to apply. Accepted values: \"Basic\", \"VersionCompare\", \"Full\" (case-insensitive). Mutually exclusive with 'pipeline'.", "nullable": true }, "pipeline": { "type": "array", "items": { "$ref": "#/components/schemas/PipelineStep" }, "description": "Ordered list of pipeline processing steps. Mutually exclusive with 'strategy'.", "nullable": true }, "output": { "$ref": "#/components/schemas/DiffingOutputConfig" } }, "additionalProperties": false }
CreateDiffJobRequest
GUID of the iTwin that owns the iModel.
GUID of the iModel to diff.
A 1-based starting changeset index (inclusive).
A 1-based ending changeset index (inclusive).
{ "title": "CreateDiffJobRequest", "required": [ "diffingPlan", "iModelId", "iTwinId" ], "type": "object", "properties": { "iTwinId": { "minLength": 1, "type": "string", "description": "GUID of the iTwin that owns the iModel." }, "iModelId": { "minLength": 1, "type": "string", "description": "GUID of the iModel to diff." }, "startChangesetIndex": { "maximum": 2147483647, "minimum": 1, "type": "integer", "description": "A 1-based starting changeset index (inclusive).", "format": "int32", "nullable": true, "deprecated": true }, "endChangesetIndex": { "maximum": 2147483647, "minimum": 1, "type": "integer", "description": "A 1-based ending changeset index (inclusive).", "format": "int32", "nullable": true, "deprecated": true }, "startChangeset": { "$ref": "#/components/schemas/ChangesetReference" }, "endChangeset": { "$ref": "#/components/schemas/ChangesetReference" }, "diffingPlan": { "$ref": "#/components/schemas/DiffingPlan" } }, "additionalProperties": false }
DiffError
{ "title": "DiffError", "required": [ "code", "message" ], "type": "object", "properties": { "code": { "type": "string", "nullable": true }, "message": { "type": "string", "nullable": true } }, "additionalProperties": false }
DiffJob
Unique identifier for this diff job.
Current job status: Queued, Started, Completed, or Failed.
GUID of the iTwin that owns the iModel.
GUID of the iModel being diffed.
1-based index of the starting changeset (inclusive).
1-based index of the ending changeset (inclusive).
Canonical Id of the starting changeset (inclusive).
Canonical Id of the ending changeset (inclusive).
Presigned Azure SAS URL to the results blob. Present only when status is Completed.
Number of agent jobs that have finished processing.
Total number of agent jobs for this diff.
{ "title": "DiffJob", "required": [ "diffingPlan", "endChangesetIndex", "iModelId", "iTwinId", "jobId", "startChangesetIndex", "status" ], "type": "object", "properties": { "jobId": { "type": "string", "description": "Unique identifier for this diff job.", "nullable": true }, "status": { "type": "string", "description": "Current job status: Queued, Started, Completed, or Failed.", "nullable": true }, "iTwinId": { "type": "string", "description": "GUID of the iTwin that owns the iModel.", "nullable": true }, "iModelId": { "type": "string", "description": "GUID of the iModel being diffed.", "nullable": true }, "startChangesetIndex": { "type": "integer", "description": "1-based index of the starting changeset (inclusive).", "format": "int32" }, "endChangesetIndex": { "type": "integer", "description": "1-based index of the ending changeset (inclusive).", "format": "int32" }, "startChangesetId": { "type": "string", "description": "Canonical Id of the starting changeset (inclusive).", "nullable": true }, "endChangesetId": { "type": "string", "description": "Canonical Id of the ending changeset (inclusive).", "nullable": true }, "diffingPlan": { "$ref": "#/components/schemas/DiffingPlan" }, "error": { "$ref": "#/components/schemas/DiffError" }, "href": { "type": "string", "description": "Presigned Azure SAS URL to the results blob. Present only when status is Completed.", "nullable": true }, "completedAgents": { "type": "integer", "description": "Number of agent jobs that have finished processing.", "format": "int32", "nullable": true }, "totalAgents": { "type": "integer", "description": "Total number of agent jobs for this diff.", "format": "int32", "nullable": true } }, "additionalProperties": false }
DiffJobResponse
Response wrapper containing a single V3 diff job.
{ "title": "DiffJobResponse", "required": [ "job" ], "type": "object", "properties": { "job": { "$ref": "#/components/schemas/DiffJob" } }, "additionalProperties": false, "description": "Response wrapper containing a single V3 diff job." }
Was this page helpful?