Table of contents
Property Validation
Download API definition:
This operation is deprecated. Please upgrade to the current version of this API as soon as possible.
PUT https://api.bentley.com/validation/propertyValue/tests/{id}

Updates a property value validation test for the specified criteria and returns the id of the successfully updated test.

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
In
Required?
Description
id
template
Yes

Test id

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

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

Request body

Update Property Value Test

Name
Type
Required?
Description
displayName
String
Yes

The name of the test.

description
String
Yes

The description of the test.

stopExecutionOnFailure
Boolean
Yes

The flag to stop execution on failure.

rules
String[]
Yes

The ids of the rules to associate with the test.

Example

json
{
    "displayName": "PV test1",
    "description": "PV test1",
    "rules": [
        "ZuO3OCC8sUuVcgeXz1Ih_fQIIEKQjLNCh4y1BGTvDpg"
    ],
    "stopExecutionOnFailure": true
}

Response 200 OK

OK

json
{
    "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.

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

json
{
    "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)

json
{
    "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.

json
{
    "error": {
        "code": "TooManyRequests",
        "message": "More requests were received than the subscription rate-limit allows."
    }
}

Response headers

Name
Description
retry-after

The number of requests exceeds the rate-limit for the client subscription.

Property Value Test

TableSchema
Name
Type
Description
id
String

The property value validation test id.

displayName
String

The display name of the test.

description
String

The description of the test.

rules
String[]
stopExecutionOnFailure
Boolean

The flag to stop execution on failure.

_links

The link to get the test details.

Property Value Test Link

TableSchema
Name
Type
Description
self

The link to get the test details.

Update Property Value Test

Specify the test criteria to update a property value validation test.

TableSchema
Name
Type
Description
displayName
String

The name of the test.

description
String

The description of the test.

stopExecutionOnFailure
Boolean

The flag to stop execution on failure.

rules
String[]

The ids of the rules to associate with the test.

Link

Hyperlink container.

TableSchema
Name
Type
Description
href
String

Hyperlink container.

Error

Contains error information.

TableSchema
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

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.

TableSchema
Name
Type
Description
error

Error information.