Creates property value validation test for the specified criteria and returns the test id.
- 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 headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Request body
The project id of the 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.
Example
{ "projectId": "38b7e366-bc20-4bb1-9572-0797cf5221fd", "displayName": "PV test1", "description": "PV test1", "rules": [ "ZuO3OCC8sUuVcgeXz1Ih_fQIIEKQjLNCh4y1BGTvDpg" ], "stopExecutionOnFailure": true }
Response 201 Created
Created
{ "test": { "id": "ZuO3OCC8sUuVcgeXz1Ih_XLDuhM12UpJulKPzZVikxc", "displayName": "PV test1", "description": "PV test1", "rules": [ "ZuO3OCC8sUuVcgeXz1Ia_fQIIEKQjLNCh4y1BGTvDpg" ], "stopExecutionOnFailure": true, "_links": { "self": { "href": "https://api.bentley.com/validation/propertyValue/tests/ZuO3OCC8sUuVcgeXz1Ih_XLDuhM12UpJulKPzZVikxc" } } } }
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 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 'projectId' is missing in the request body.", "target": "projectId" }, { "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": "The request body is not a valid JSON object." }, { "code": "InvalidRequestBody", "message": "The request is invalid." }, { "code": "InvalidRequestBody", "message": "Request body was not provided." } ] } }
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.
Create Property Value Test
Specify the test criteria to create a property value validation test.
The project id of the 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.