Table of contents
Clash Detection
Download API definition:
This operation is deprecated. Please upgrade to the current version of this API as soon as possible.
POST https://api.bentley.com/clashdetection/runs

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

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.

Request body

Run Clash Detection Test

Name
Type
Required?
Description
testId
String
Yes

The test id of the test to run.

iModelId
String
Yes

The id of the iModel being tested.

namedVersionId
String
Yes

The id of the named version being tested.

testSettings
No

Settings to run the clash detection test.

inPlace
String
No

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

json
{
    "testId": "1cKcvg7Ky0e66uT-2u8vpZ5ifQZec1dEhNDUO8ZloRk",
    "iModelId": "72520c09-d3ad-4cc5-aac3-bb5fb256d45e",
    "namedVersionId": "380bba8d-fed2-4971-818c-112d010dfbe5",
    "testSettings": {
        "resultsLimit": "10000"
    },
    "inPlace": "true"
}

Response 201 Created

Created

json
{
    "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.

json
{
    "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.

json
{
    "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)

json
{
    "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.

json
{
    "error": {
        "code": "TooManyRequests",
        "message": "More requests were received than the subscription rate-limit allows."
    }
}

Response headers

Name
Description
retry-after

The number of requests exceeds the rate-limit for the client subscription.

Clash Detection Run

Clash detection run.

Name
Type
Description
id
String
_links

The link to get the clash detection run details.

Clash Detection Test Settings

Specify the settings to run clash detection test.

Name
Type
Description
resultsLimit
String

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.

Name
Type
Description
testId
String

The test id of the test to run.

iModelId
String

The id of the iModel being tested.

namedVersionId
String

The id of the named version being tested.

testSettings

Settings to run the clash detection test.

inPlace
String

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

Clash Detection Run Link

Name
Type
Description
run

The link to get the run details.

Link

Hyperlink container.

Name
Type
Description
href
String

Hyperlink container.

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

Error information.