Clash Detection
Download API definition:
POST https://api.bentley.com/clash-detection/itwins/{itwinId}/suppression-rules

Creates a clash detection suppression rule for the specified criteria and returns the rule 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

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

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

Request body

Create Clash Detection Suppression Rule

Name
Type
Required?
Description
name
String
Yes

The name of the suppression rule.

reason
String
Yes

The description of the suppression rule.

parameters
One of: objectstring, null
Yes

The parameters of the suppression rule must match the parameters of the template.

templateId
String
Yes

The template id of the suppression rule.

Example

json
{
    "name": "TestRule1",
    "reason": "test rule",
    "templateId": "2ec743d9-31de-4daf-bcfb-e6f274c709e4",
    "parameters": {
        "propertyKey": {
            "relationshipPath": "ArchitecturalPhysical:Door",
            "propertyName": "Roll"
        },
        "operator": {
            "value": "="
        }
    }
}

Response 201 Created

Created

json
{
    "suppressionRule": {
        "id": "6ed810af-6bbf-4acc-b73f-a859a57c4aa4",
        "name": "TestRulee1",
        "templateId": "080c182c-c9ce-44e6-9932-de9f098befbc",
        "reason": "test rule",
        "createdBy": "ecc35daa-7dd1-4cf1-9ab6-7d16a4dafcd3",
        "parameters": "{\"propertyKey\":{\"relationshipPath\":\"ArchitecturalPhysical:Door\",\"propertyName\":\"Roll\"},\"operator\":{\"value\":\"=\"}}"
    }
}

Response 400 Bad Request

The 400 (Bad Request) 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 create suppression rule request.",
        "details": [{
                "code": "InvalidRequestBody",
                "message": "Required property 'name' is missing in the request body.",
                "target": "name"
            },
            {
                "code": "InvalidRequestBody",
                "message": "Required property 'reason' is missing in the request body.",
                "target": "reason"
            },
            {
                "code": "InvalidRequestBody",
                "message": "Required property 'templateId' is missing in the request body.",
                "target": "templateId"
            },
            {
                "code": "InvalidRequestBody",
                "message": "Required property 'parameters' is missing in the request body.",
                "target": "parameters"
            },
            {
                "code": "InvalidRequestBody",
                "message": "The request is invalid."
            },
            {
                "code": "InvalidRequestBody",
                "message": "Request body was not provided."
            },
            {
                "code": "InvalidRequestBody",
                "message": "The request body is not a valid JSON object."
            }
        ]
    }
}

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

json
{
    "error": {
        "code": "iTwinNotFound",
        "message": "Requested iTwin is not available."
    }
}

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.

Create Clash Detection Suppression Rule

Specify the rule criteria to create a suppression rule.

Name
Type
Description
name
String

The name of the suppression rule.

reason
String

The description of the suppression rule.

parameters
One of: objectstring, null

The parameters of the suppression rule must match the parameters of the template.

templateId
String

The template id of the suppression rule.

Clash Detection Suppression Rule

Name
Type
Description
suppressionRule

Includes details of created clash detection suppression rule.

Clash Detection Suppression Rule Details

Name
Type
Description
id
String

The id of the suppression rule.

name
String

The name of the suppression rule.

templateId
String

The template id of the suppression rule.

reason
String

The reason for the suppression rule.

parameters
One of: objectstring, null

The parameters for the suppression rule.

createdBy
String

Unique id of the user who created the suppression rule.

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?