Creates a clash detection suppression rule for the specified criteria and returns the rule id.
- Discover suppression template ids by calling GET /clash-detection/itwins/{itwinId}/suppression-templates
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
The iTwin Id
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v2+json
is recommended.
Request body
Create Clash Detection Suppression Rule
Example
{ "name": "TestRule1", "reason": "test rule", "templateId": "2ec743d9-31de-4daf-bcfb-e6f274c709e4", "parameters": { "propertyKey": { "relationshipPath": "ArchitecturalPhysical:Door", "propertyName": "Roll" }, "operator": { "value": "=" } } }
Response 201 Created
Created
{ "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)
{ "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.
{ "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.
{ "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.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
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.
{ "title": "Create Clash Detection Suppression Rule", "type": "object", "description": "Specify the rule criteria to create a suppression rule.", "properties": { "name": { "type": "string", "description": "The name of the suppression rule." }, "reason": { "type": "string", "description": "The description of the suppression rule." }, "parameters": { "oneOf": [ { "type": "object" }, { "type": "string" } ], "nullable": true, "description": "The parameters of the suppression rule must match the parameters of the template." }, "templateId": { "type": "string", "description": "The template id of the suppression rule." } }, "additionalProperties": false, "required": [ "name", "reason", "templateId", "parameters" ] }
Clash Detection Suppression Rule
Includes details of created clash detection suppression rule.
{ "title": "Clash Detection Suppression Rule", "type": "object", "properties": { "suppressionRule": { "type": "object", "description": "Includes details of created clash detection suppression rule.", "$ref": "#/components/schemas/create-clash-detection-rule-response" } }, "additionalProperties": false }
Clash Detection Suppression Rule Details
The id of the suppression rule.
The name of the suppression rule.
The template id of the suppression rule.
The reason for the suppression rule.
Unique id of the user who created the suppression rule.
{ "title": "Clash Detection Suppression Rule Details", "type": "object", "properties": { "id": { "type": "string", "description": "The id of the suppression rule." }, "name": { "type": "string", "description": "The name of the suppression rule." }, "templateId": { "type": "string", "description": "The template id of the suppression rule." }, "reason": { "type": "string", "description": "The reason for the suppression rule." }, "parameters": { "oneOf": [ { "type": "object" }, { "type": "string" } ], "nullable": true, "description": "The parameters for the suppression rule." }, "createdBy": { "type": "string", "description": "Unique id of the user who created the suppression rule." } }, "additionalProperties": false }
DetailedError
Contains error information and an array of more specific errors.
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 and an array of more specific errors.", "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 }, "details": { "type": "array", "description": "Optional array of more specific errors.", "items": { "$ref": "#/components/schemas/Error" } } }, "required": [ "code", "message", "details" ], "additionalProperties": true }
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.
{ "type": "object", "title": "Detailed 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 Detailed information.", "$ref": "#/components/schemas/DetailedError" } }, "required": [ "error" ], "additionalProperties": false }
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" ], "additionalProperties": true }
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" ], "additionalProperties": false }
Was this page helpful?