Table of contents
Clash Detection
Download API definition:
GET https://api.bentley.com/clash-detection/itwins/{itwinId}/reports/{id}[?cuid]

Retrieves the details of the clash detection report for the specified report id.

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 parameters

Name
Required?
Description
itwinId
Yes

The iTwin Id

id
Yes

Report id

cuid
No

Clash unique id for which the clash should be retrieved.

Request headers

Name
Required?
Description
Include-User-Metadata
No

Optional - Include user metadata when true.

Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

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

Response 200 OK

OK

json
{
    "metadata": {
        "id": "ce75597b-3de6-454c-8592-fa17928f8aa1",
        "iTwinId": "384ebc14-d362-4a5a-8dce-0a5b3ebbe8ba",
        "repositoryId": "721e1260-6549-4216-a689-be80cc6648cf",
        "changesetId": "a8a3a9ad-862e-4ee9-8d88-c2bd220a8f57",
        "configurationId": "772c3f9d-4445-4c2d-9b4e-127827b4f8b2",
        "executed": "2023-06-17T14:45:47.66Z",
        "duration": 0,
        "numValidations": 102,
        "numElements": 31,
        "numRules": 7,
        "numIssues": 2,
        "status": 1,
        "userId": "76c4a684-fbdf-44e3-ae9b-dbdf9de1dbf2",
        "testSettings": {
            "resultsLimit": 10
        },
        "jobId": "e0e5ca59-4b5f-433d-a5ee-5a825e734782",
        "configurationName": "string",
        "changesetName": "version 1",
        "repositoryName": "Test iModel",
        "modifiedBy": "string",
        "modifiedAt": "2023-06-17T14:45:47.66Z",
        "userMetadata": {
            "createdBy": {
                "email": "Test.User@bentley.com",
                "name": "Test User"
            },
            "modifiedBy": {
                "email": "Test.User@bentley.com",
                "name": "Test User"
            }
        }
    },
    "report": {
        "calculateOverlap": true,
        "elementsWLoaderrors": 0,
        "numProcessed": 5,
        "numResults": 5,
        "processingTime": 200,
        "clashes": [{
            "cuid": "11099285-2960-46cb-999a-14f857def177",
            "elementAId": "0x20000000701",
            "elementALabel": "Pipe 6 1-SWS-0104",
            "elementBId": "0x200000011a7",
            "elementBLabel": "Pipe 6 1-SWS-0107",
            "clashType": "Collision",
            "clearance": -1,
            "elementAModelId": "0x20000000030",
            "elementBModelId": "0x20000000030",
            "elementACategoryId": "0x20000000047",
            "elementBCategoryId": "0x20000000047",
            "suppressingRules": [
                "9158efd6-2f18-455d-a032-91cfc636563b"
            ],
            "isMSupp": false,
            "status": 0,
            "boundingSphere": {
                "radius": 0,
                "center": {
                    "x": 0,
                    "y": 0,
                    "z": 0
                }
            },
            "id": 0
        }],
        "categoryList": [{
            "id": "0x20000000047",
            "label": "SWS-1-SWS-0104",
            "count": 1
        }],
        "modelList": [{
            "id": "0x20000000030",
            "label": "3D-PLANT",
            "count": 1
        }],
        "suppressionRules": [{
            "id": "9158efd6-2f18-455d-a032-91cfc636563b",
            "definition": "Test suppression rule.",
            "user": "76c4a684-fbdf-44e3-ae9b-dbdf9de1dbf2",
            "reason": "Test rule reason.",
            "parameters": {},
            "name": "Test rule"
        }]
    }
}

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 report/iTwin was not found.

json
{
    "error": {
        "code": "ResourceNotFound",
        "message": "Requested Resource is not available.",
        "details": [{
                "code": "iTwinNotFound",
                "message": "Requested iTwin is not available."
            },
            {
                "code": "ClashReportIdNotFound",
                "message": "Requested Clash Report Id 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": "InvalidClashDetectionReportRequest",
        "message": "Invalid clash detection report request."
    }
}

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.

json
{
    "error": {
        "code": "RateLimitExceeded",
        "message": "The client sent more requests than allowed by this API for the current tier of the client."
    }
}

Response headers

Name
Description
retry-after

Number of seconds to wait until client is allowed to make more requests.

Clash Detection Result

Name
Type
Description
metadata

Metadata of the the clash report.

report

Clash detection report details.

clash-result

Details of the the clash report.

Name
Type
Description
calculateOverlap
Boolean

Flag to calculate and report clash overlaps (minimum orthogonal overlap distance).

elementsWLoaderrors
Number

Number of element load errors.

numProcessed
Number

Number of elements processed.

numResults
Number

Number of results generated.

processingTime
Number

Processing time of the run.

clashes

Array of clashes.

categoryList

Category lookup table. Contains an array of category id, category display name and count pairs.

modelList

Model lookup table. Contains an array of model id, category display name and count pairs.

suppressionRules

Suppression rule lookup table.

Details of clashes

Details of clashes.

Name
Type
Description
cuid
String

Unique id of the clash report.

elementAId
String

The unique id of element A.

elementBId
String

The unique id of element B.

elementALabel
String

The display label of element A.

elementBLabel
String

The display label of element B.

clashType
String

The type of clash detected - possible values: Collision, Clearance, Touching, Not Initialized.

clearance
Number

When the clash type is Clearance, the value is returned in meters. Otherwise -1 is returned.

elementAModelId
String

Id of Element A Model.

elementBModelId
String

Id of Element B Model.

elementACategoryId
String

Id of Element A Category.

elementBCategoryId
String

Id of Element B Category.

suppressingRules
String[]

Array of suppressing rules for the clash.

isMSupp
Boolean

Flag to check if clash is manually suppressed.

status
Number

The status of clash. Possible values - 0: New, 1: Open, 3: Resolved.

boundingSphere

Bounding sphere of the source element.

id
Number

Clash id.

Bounding Sphere

Bounding sphere of the source element.

Name
Type
Description
radius
Number

The clash radius.

center

The clash center point.

Clash Center

The clash center point. This contains x, y, and z properties for the exact spatial position of the center point.

Name
Type
Description
x
Number

x-axis value for the center point.

y
Number

y-axis value for the center point.

z
Number

z-axis value for the center point.

Clash-result-metadata

Metadata of the the clash report.

Name
Type
Description
id
String

Unique id of the clash report.

iTwinId
String

The unique id of iTwin.

repositoryId
String

The unique id of iModel.

changesetId
String

The unique id of changeset.

configurationId
String

The unique id of configuration.

executed
Date-time

Execution date time of validation run.

duration
Number

Duration of the validation run.

numValidations
Number

Number of validations that occurred..

numElements
Number

Number of elements processed.

numRules
Number

Number of rules processed.

numIssues
Number

Number of issues generated.

status
Number

The status of the clash detection run. Started = 0, Completed = 1, Failed = 2.

userId
String

Unique id of user that started the run.

testSettings

Settings to run the clash detection test.

jobId
String

Unique id for the job.

configurationName
String

The name of the configuration.

changesetName
String

The name of the changeset.

repositoryName
String

The name of the iModel.

modifiedBy
String

Unique id of user that modified the run.

modifiedAt
Date-time

Modification date time of validation run.

userMetadata

User Metadata - available if Include-User-Metadata flag is set to true.

User Details

User Details.

Name
Type
Description
createdBy

User details.

modifiedBy

User details.

Created By User Details

Created By User Details.

Name
Type
Description
name
String

Name of user that created the run.

email
String

Email id of user that created the run.

Modified By User Details

Modified By User Details.

Name
Type
Description
name
String

Name of user that modified the run.

email
String

Email of user that modified the run.

Category Lookup Entry

Name
Type
Description
id
String

Unique identifier of the category.

label
String

Name of the category.

count
Number

Count of the category.

Model Lookup Entry

Name
Type
Description
id
String

Unique identifier of the model.

label
String

Name of the model.

count
Number

Count of the model.

Suppression Rule Lookup Entry

Name
Type
Description
id
String

Unique identifier of the suppression rule.

definition
String

Description of the suppression rule.

user
String

Unique id of user that created the suppression rule.

reason
String

Reason for the suppression rule.

parameters
One of: objectstring, null

Parameters will vary based on the chosen template. Some templates, like 'suppress clashes if clashing elements are in the same category, do not require any parameters.

name
String

Name of the suppression rule.

Clash Detection Test Settings

Name
Type
Description
resultsLimit
One of: numberstring

The maximum clash/failure limit for the clash detection test. Default is 100000.

DetailedError

Contains error information and an array of more specific errors.

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.

details

Optional array of more specific errors.

Detailed 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 Detailed information.

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.

Was this page helpful?