Queues a new diff job for the specified iModel changeset range and diffing strategy. 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.
Request body
CreateDiffJobRequest
GUID of the iTwin that owns the iModel.
GUID of the iModel to diff.
Index of the ending changeset (inclusive). Must be greater than startChangesetIndex.
Index of the starting changeset (inclusive).
Example
{ "iTwinId": "string", "iModelId": "string", "startChangesetIndex": 0, "endChangesetIndex": 0, "diffingPlan": { "strategy": "string" } }
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": 0, "endChangesetIndex": 10, "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.
The target of the error.
A human-readable representation of the error.
{ "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "target": { "type": "string", "nullable": true, "description": "The target of the error." }, "message": { "type": "string", "description": "A human-readable representation of the error." } }, "description": "Contains error information.", "additionalProperties": true }
DiffJob
Presigned Azure SAS URL to the results blob. Present only when status is Completed.
Error details. Present only when status is Failed.
Unique identifier for this diff job.
Current job status: Queued, Started, Completed, or Failed.
Total number of agent jobs for this diff.
Number of agent jobs that have finished processing.
{ "type": "object", "title": "DiffJob", "required": [ "diffingPlan", "endChangesetIndex", "iModelId", "iTwinId", "jobId", "startChangesetIndex", "status" ], "properties": { "href": { "type": "string", "nullable": true, "description": "Presigned Azure SAS URL to the results blob. Present only when status is Completed." }, "error": { "type": "string", "nullable": true, "description": "Error details. Present only when status is Failed." }, "jobId": { "type": "string", "nullable": true, "description": "Unique identifier for this diff job." }, "status": { "type": "string", "nullable": true, "description": "Current job status: Queued, Started, Completed, or Failed." }, "iTwinId": { "type": "string", "nullable": true }, "iModelId": { "type": "string", "nullable": true }, "diffingPlan": { "$ref": "#/components/schemas/DiffingPlan" }, "totalAgents": { "type": "integer", "format": "int32", "nullable": true, "description": "Total number of agent jobs for this diff." }, "completedAgents": { "type": "integer", "format": "int32", "nullable": true, "description": "Number of agent jobs that have finished processing." }, "endChangesetIndex": { "type": "integer", "format": "int32" }, "startChangesetIndex": { "type": "integer", "format": "int32" } }, "additionalProperties": false }
DiffingPlan
Diffing strategy to apply. Accepted values: "Basic", "VersionCompare", "Full" (case-insensitive).
{ "type": "object", "title": "DiffingPlan", "required": [ "strategy" ], "properties": { "strategy": { "type": "string", "minLength": 1, "description": "Diffing strategy to apply. Accepted values: \"Basic\", \"VersionCompare\", \"Full\" (case-insensitive)." } }, "additionalProperties": false }
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.
{ "type": "object", "title": "Error Response", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/Error", "description": "Error information." } }, "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.", "additionalProperties": false }
DiffJobResponse
{ "type": "object", "title": "DiffJobResponse", "required": [ "job" ], "properties": { "job": { "$ref": "#/components/schemas/DiffJob" } }, "additionalProperties": false }
CreateDiffJobRequest
GUID of the iTwin that owns the iModel.
GUID of the iModel to diff.
Index of the ending changeset (inclusive). Must be greater than startChangesetIndex.
Index of the starting changeset (inclusive).
{ "type": "object", "title": "CreateDiffJobRequest", "required": [ "diffingPlan", "endChangesetIndex", "iModelId", "iTwinId", "startChangesetIndex" ], "properties": { "iTwinId": { "type": "string", "minLength": 1, "description": "GUID of the iTwin that owns the iModel." }, "iModelId": { "type": "string", "minLength": 1, "description": "GUID of the iModel to diff." }, "diffingPlan": { "$ref": "#/components/schemas/DiffingPlan" }, "endChangesetIndex": { "type": "integer", "format": "int32", "maximum": 2147483647, "minimum": 0, "description": "Index of the ending changeset (inclusive). Must be greater than startChangesetIndex." }, "startChangesetIndex": { "type": "integer", "format": "int32", "maximum": 2147483647, "minimum": 0, "description": "Index of the starting changeset (inclusive)." } }, "additionalProperties": false }
Was this page helpful?