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.
The id of the iModel being tested.
The id of the named version being tested.
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
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.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
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 user has sent too many requests in a given amount of time.
{ "error": { "code": "TooManyRequests", "message": "More requests were received than the subscription rate-limit allows." } }
Response headers
The number of requests exceeds the rate-limit for the client subscription.
Clash Detection Run
Clash detection run.
{ "title": "Clash Detection Run", "type": "object", "description": "Clash detection run.", "properties": { "id": { "type": "string" }, "_links": { "$ref": "#/components/schemas/clash-detection-run-link", "description": "The link to get the clash detection run details." } } }
Clash Detection Test Settings
Specify the settings to run clash detection test.
The maximum results limit for the clash detection test.
{ "title": "Clash Detection Test Settings", "type": "object", "description": "Specify the settings to run clash detection test.", "properties": { "resultsLimit": { "type": "string", "description": "The maximum results limit for the clash detection test." } } }
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.
The id of the iModel being tested.
The id of the named version being tested.
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
{ "title": "Run Clash Detection Test", "type": "object", "description": "Specify the test id, iModel id and named version id to run clash detection test.", "properties": { "testId": { "type": "string", "description": "The test id of the test to run." }, "iModelId": { "type": "string", "description": "The id of the iModel being tested." }, "namedVersionId": { "type": "string", "description": "The id of the named version being tested." }, "testSettings": { "$ref": "#/components/schemas/clash-detection-test-settings", "description": "Settings to run the clash detection test." }, "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" } }, "required": [ "testId", "iModelId", "namedVersionId" ] }
Clash Detection Run Link
{ "title": "Clash Detection Run Link", "type": "object", "properties": { "run": { "$ref": "#/components/schemas/Link", "description": "The link to get the run details." } } }
Link
Hyperlink container.
Hyperlink container.
{ "type": [ "object", "null" ], "description": "Hyperlink container.", "properties": { "href": { "type": "string", "description": "Hyperlink container." } } }
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.
{ "type": "object", "description": "Contains error information.", "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 } }, "required": [ "code", "message" ] }
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", "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.", "properties": { "error": { "description": "Error information.", "$ref": "#/components/schemas/Error" } }, "required": [ "error" ] }
Was this page helpful?