Updates a property value validation test for the specified criteria and returns the id of the successfully updated test.
Discover test ids by calling GET /validation/propertyValue/tests
Discover rule ids by calling GET /validation/propertyValue/rules
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
Test id
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Request body
The name of the test.
The description of the test.
The flag to stop execution on failure.
The ids of the rules to associate with the test.
Example
{ "displayName": "PV test1", "description": "PV test1", "rules": [ "ZuO3OCC8sUuVcgeXz1Ih_fQIIEKQjLNCh4y1BGTvDpg" ], "stopExecutionOnFailure": true }
Response 200 OK
OK
{ "test": { "id": "ZuO3OCC8sUuVcgeXz1Ih_csD_wAZ0jBKqy0Cm77sLqw", "displayName": "PV test1", "description": "PV test1", "rules": [ "ZuO3OCC8sUuVcgeXz1Ih_QE_7wcQ6WZIqE_IWb8geVc" ], "stopExecutionOnFailure": true, "_links": { "self": { "href": "https://api.bentley.com/validation/propertyValue/tests/ZuO3OCC8sUuVcgeXz1Ih_csD_wAZ0jBKqy0Cm77sLqw" } } } }
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 test was not found.
{ "error": { "code": "ValidationTestNotFound", "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)
{ "error": { "code": "InvalidValidationRequest", "message": "Invalid property value validation request.", "details": [{ "code": "InvalidRequestBody", "message": "Required property 'displayName' is missing in the request body.", "target": "displayName" }, { "code": "InvalidRequestBody", "message": "Required property 'description' is missing in the request body.", "target": "description" }, { "code": "InvalidRequestBody", "message": "Required property 'rules' is missing in the request body.", "target": "rules" }, { "code": "InvalidRequestBody", "message": "Required property 'stopExecutionOnFailure' is missing in the request body.", "target": "stopExecutionOnFailure" }, { "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.
{ "error": { "code": "TooManyRequests", "message": "More requests were received than the subscription rate-limit allows." } }
The number of requests exceeds the rate-limit for the client subscription.
Property Value Test
The property value validation test id.
The display name of the test.
The description of the test.
The flag to stop execution on failure.
Update Property Value Test
Specify the test criteria to update a property value validation test.
The name of the test.
The description of the test.
The flag to stop execution on failure.
The ids of the rules to associate with the test.
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.
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.