Table of contents
Clash Detection
Download API definition:
PATCH https://api.bentley.com/clash-detection/itwins/{itwinId}/suppression-rules/{id}

Updates a clash detection suppression rule based on the specified criteria and returns the id and details of the successfully updated rule.

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
id
Yes

Rule id

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

Update Clash Detection Suppression Rule

Name
Type
Required?
Description
name
String
No

The name of the suppression rule.

reason
String
No

The description of the suppression rule.

parameters
One of: objectstring, null
No

The parameters for the suppression rule.

Example

json
{
    "name": "TestRule1Updated",
    "reason": "test rule",
    "parameters": {
        "likeExpression1": {
            "value": "e1"
        }
    }
}

Response 200 OK

OK

json
{
    "suppressionRule": {
        "id": "9878762c-2cb0-4c41-baa5-ac2d3b682bb3",
        "templateId": "c512f828-3fa0-4cf7-b33a-4633f18d8a54",
        "name": "APIMtest-updated",
        "createdBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "reason": "APIM test",
        "parameters": "{\"propertyKey\":{\"relationshipPath\":\"ArchitecturalPhysical:Door\",\"propertyName\":\"Roll\"},\"operator\":{\"value\":\"=\"}}",
        "creationDate": "2021-06-17T14:45:47.66Z",
        "modificationDate": "2021-06-24T14:49:59.66Z",
        "lastModifiedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
}

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

json
{
    "error": {
        "code": "ClashDetectionSuppressionRuleNotFound",
        "message": "Requested suppression rule 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": "The request is invalid."
            },
            {
                "code": "InvalidRequestBody",
                "message": "Request body was not provided."
            },
            {
                "code": "InvalidRequestBody",
                "message": "The request body is not a valid JSON object."
            },
            {
                "code": "InvalidRequestBody",
                "message": "Request body does not contain expected properties 'name' or 'reason'."
            }
        ]
    }
}

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.

Update Clash Detection Suppression Rule

Specify the rule criteria to update a clash detection 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 for the suppression rule.

Clash Detection Suppression Rule

Name
Type
Description
suppressionRule

The id of the suppression rule.

Clash Detection Suppression Rule

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.

creationDate
Date-time

The date/time when the suppression rule was created.

modificationDate
Date-time

The date/time when the suppression rule was last modified.

lastModifiedBy
String

Id of user that last modified 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?