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.
POST https://api.bentley.com/validation/propertyValue/runs

Runs a property value validation test for the specified test id and returns the run id. The maximum number of validation failures may be specified with the resultsLimit parameter in the request body. If none is specified, the default is 100,000.

  • This API has a rate limit of 6 API calls per second. If an application exceeds the rate limit it will receive an HTTP error code 429 "Too Many Requests". The error response includes a Retry-After header that indicates how long clients should wait before retrying.

  • A link is included to retrieve the run status as the agent job completes asynchronously.

  • Discover test ids by calling GET /validation/propertyValue/tests

  • Discover iModel ids by calling GET /imodels

  • Discover named version ids by calling GET /imodels/{id}/namedversions

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

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

Run Property Value Test

Name
Type
Required?
Description
testId
String
Yes

The test id of the test to run.

iModelId
String
Yes

The id of the iModel being tested.

namedVersionId
String
Yes

The id of the named version being tested.

Example

json
{
    "testId": "ZuO3OCC8sUuVcgeXz1Ih_TsW5jCImyFKjomf_voaSbQ",
    "iModelId": "72520c09-d3ad-4cc5-aac3-bb5fb256d45e",
    "namedVersionId": "380bba8d-fed2-4971-818c-112d010dfbe5",
    "testSettings": {
        "resultsLimit": "10000"
    }
}

Response 201 Created

Created

json
{
    "run": {
        "id": "1cKcvg7Ky0e66uT-2u8vpSTBs9cXiSlMrE8Zym2jD0Y",
        "_links": {
            "run": {
                "href": "https://api.bentley.com/validation/propertyValue/runs/1cKcvg7Ky0e66uT-2u8vpSTBs9cXiSlMrE8Zym2jD0Y"
            }
        }
    }
}

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

Unprocessable Entity

json
{
    "error": {
        "code": "InvalidValidationRequest",
        "message": "Invalid property value validation request.",
        "details": [{
                "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."
            },
            {
                "code": "InvalidRequestBody",
                "message": "Required property 'iModelId' is missing in the request body.",
                "target": "iModelId"
            },
            {
                "code": "InvalidRequestBody",
                "message": "Required property 'namedVersionId' is missing in the request body.",
                "target": "namedVersionId"
            },
            {
                "code": "InvalidRequestBody",
                "message": "Required property 'testId' is missing in the request body.",
                "target": "testId"
            }
        ]
    }
}

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 Run

Property value validation run

TableSchema
Name
Type
Description
id
String
_links

The link to get the run details.

Run Property Value Test

Specify the test id, iModel id and named version id to run property value test.

TableSchema
Name
Type
Description
testId
String

The test id of the test to run.

iModelId
String

The id of the iModel being tested.

namedVersionId
String

The id of the named version being tested.

Property Value Run Link

TableSchema
Name
Type
Description
run

The link to get the run details.

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.