Runs a Clash Detection test for the specified test id and returns the run id. The maximum number of clashes may be specified with the resultsLimit parameter in the request body. If none is specified, the default is 100,000.
-
This API has a rate limit of 6 API calls per second. If an application exceeds the rate limit it will receive an HTTP error code 429 "Too Many Requests". The error response includes a Retry-After header that indicates how long clients should wait before retrying.
-
A link is included to retrieve the run status as the agent job completes asynchronously.
-
Discover test ids by calling GET /clashdetection/tests
-
Discover iModel ids by calling GET /imodels
-
Discover named version ids by calling GET /imodels/{id}/namedversions
Authentication
Requires Authorization header with valid Bearer token for scope itwin-platform.
For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.
Request body
Run Clash Detection Test
The test id of the test to run.
Optional - Select inPlace flag, available values - False: create new clash results in subsequent runs for the combination of TestId, iModelId and namedVersionId; True: update the existing clash results in subsequent runs for the combination of TestId, iModelId and namedVersionId; Force: run the clash test on same combination
The id of the iModel being tested.
The id of the named version being tested.
Example
{ "testId": "1cKcvg7Ky0e66uT-2u8vpZ5ifQZec1dEhNDUO8ZloRk", "iModelId": "72520c09-d3ad-4cc5-aac3-bb5fb256d45e", "namedVersionId": "380bba8d-fed2-4971-818c-112d010dfbe5", "testSettings": { "resultsLimit": "10000" }, "inPlace": "true" }
Response 201 Created
Created
{ "run": { "id": "1cKcvg7Ky0e66uT-2u8vpSTBs9cXiSlMrE8Zym2jD0Y", "_links": { "run": { "href": "https://api.bentley.com/clashdetection/runs/1cKcvg7Ky0e66uT-2u8vpSTBs9cXiSlMrE8Zym2jD0Y" } } } }
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.
{ "$ref": "#/components/examples/401.HeaderNotFound.example" }
Response 404 Not Found
This response indicates that the specified test was not found.
{ "error": { "code": "ClashDetectionTestNotFound", "message": "Requested test is not available." } }
Response 422 Unprocessable Entity
The 422 (Unprocessable Entity) status code indicates that the request cannot be processed by the server due to a client error (e.g. malformed request syntax)
{ "error": { "code": "InvalidClashDetectionRequest", "message": "Invalid clash detection request.", "details": [{ "code": "InvalidRequestBody", "message": "Required property 'iModelId' is missing in the request body.", "target": "iModelId" }, { "code": "InvalidRequestBody", "message": "Required property 'namedVersionId' is missing in the request body.", "target": "namedVersionId" }, { "code": "InvalidRequestBody", "message": "Required property 'testId' is missing in the request body.", "target": "testId" }, { "code": "InvalidRequestBody", "message": "Request body was not provided." }, { "code": "InvalidRequestBody", "message": "The request is invalid." }, { "code": "InvalidRequestBody", "message": "The request body is not a valid JSON object." }] } }
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.
Link
Hyperlink container.
Hyperlink container.
{ "properties": { "href": { "type": "string", "description": "Hyperlink container." } }, "description": "Hyperlink container." }
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 }
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 }
Run Clash Detection Test
Specify the test id, iModel id and named version id to run clash detection test.
The test id of the test to run.
Optional - Select inPlace flag, available values - False: create new clash results in subsequent runs for the combination of TestId, iModelId and namedVersionId; True: update the existing clash results in subsequent runs for the combination of TestId, iModelId and namedVersionId; Force: run the clash test on same combination
The id of the iModel being tested.
The id of the named version being tested.
{ "type": "object", "title": "Run Clash Detection Test", "required": [ "testId", "iModelId", "namedVersionId" ], "properties": { "testId": { "type": "string", "description": "The test id of the test to run." }, "inPlace": { "type": "string", "description": "Optional - Select inPlace flag, available values - False: create new clash results in subsequent runs for the combination of TestId, iModelId and namedVersionId; True: update the existing clash results in subsequent runs for the combination of TestId, iModelId and namedVersionId; Force: run the clash test on same combination" }, "iModelId": { "type": "string", "description": "The id of the iModel being tested." }, "testSettings": { "$ref": "#/components/schemas/clash-detection-test-settings" }, "namedVersionId": { "type": "string", "description": "The id of the named version being tested." } }, "description": "Specify the test id, iModel id and named version id to run clash detection test." }
Clash Detection Run Link
{ "type": "object", "title": "Clash Detection Run Link", "properties": { "run": { "$ref": "#/components/schemas/Link" } } }
Clash Detection Run
Clash detection run.
{ "type": "object", "title": "Clash Detection Run", "properties": { "id": { "type": "string" }, "_links": { "$ref": "#/components/schemas/clash-detection-run-link" } }, "description": "Clash detection run." }
Clash Detection Test Settings
Specify the settings to run clash detection test.
The maximum results limit for the clash detection test.
{ "type": "object", "title": "Clash Detection Test Settings", "properties": { "resultsLimit": { "type": "string", "description": "The maximum results limit for the clash detection test." } }, "description": "Specify the settings to run clash detection test." }
Was this page helpful?