Evaluate Rules
POST
rules:evaluate
Evaluates inputs against the rules converted and parsed from the codeblocks in the provided rulesKey
Resource Information
| Method and URI | POST https://developer.api.autodesk.com/industrialized-construction/informed-design/v1/rules:evaluate |
| Authentication Context | User context required |
| Required OAuth Scopes | data:read data:write data:create account:read |
| Data Format | JSON |
Request
Headers
| Authorization* string | Must be Bearer <token>, where <token> is a three-legged access token obtained via an Authorization Code flow or a Secure Service Account (SSA) flow.
The SSA flow is designed for headless server-to-server operations. While it functions like a two-legged flow (no user interaction), it is classified as three-legged because it preserves user context. |
| Content-Type* string | Must be application/json |
* Required
Request
Body Structure
Expand all
| rules* string | The objectKey for the rules. |
| inputs* array | |
| oneOf* array:oneOf | |
| Boolean Input* object | Boolean input. |
| name* string | The name of the input. |
| type* enum:string | The type of the input. Will always be: BOOLEAN |
| value* boolean | The value of the input. |
| Text Input* object | Text input. |
| name* string | The name of the input. |
| type* enum:string | The type of the input. Will always be: TEXT |
| value* string | The value of the input. |
| Numeric Input* object | Numeric input. |
| name* string | The name of the input. |
| type* enum:string | The type of the input. Will always be: NUMERIC |
| value* number | The value of the input. |
* Required
Response
HTTP Status Code Summary
| 200 OK | Rules evaluation executed successfully. |
| 400 Bad Request | The server could not process your request. It is likely due to incorrect formatting or missing information. The response body may indicate what is wrong. Please review and resubmit your request. |
| 401 Unauthorized | The supplied authorization header was invalid or the token scope was not acceptable. Verify your authentication credentials and try again. |
| 403 Forbidden | The request was valid but lacked the necessary permissions. Verify your credentials and permissions before sending the request again. |
| 404 Not Found | The requested resource could not be found on the server. Review the request and try again. |
| 429 Too Many Requests | The server has received too many requests within the allowed time window. Please wait before retrying. |
| 500 Internal Server Error | An unexpected error occurred on the server. Please try again later. |
Response
Body Structure (200)
Expand all
| evaluatedInputs array | An array of evaluated inputs. |
| oneOf array:oneOf | |
| 0 object | |
| name string | The name of the input. |
| type enum:string | The type of the input. Will always be: BOOLEAN |
| value boolean | The value of the input. |
| * | |
| 1 object | |
| name string | The name of the input. |
| type enum:string | The type of the input. Will always be: TEXT |
| value string | The value of the input. |
| * | |
| 2 object | |
| name string | The name of the input. |
| type enum:string | The type of the input. Will always be: NUMERIC |
| value number | The value of the input. |
| * | |
| error object | The error details. |
| title string | The title of the error. |
| type string | The type of the error. |
| errors array: object | An array of error items. |
| title string | The title of the error item. |
| detail string | A detailed description of the error item. |
| field string | The field associated with the error item. |
| type string | The type of the error item. |
| * |
Example
Rules evaluation executed successfully.
Request
curl -v 'https://developer.api.autodesk.com/industrialized-construction/informed-design/v1/rules:evaluate' \
-X 'POST' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
-H 'Content-Type: application/json' \
-d '{
"rules": "",
"inputs": [
{
"name": "",
"type": "BOOLEAN",
"value": ""
}
]
}'
Show More
Response
{
"evaluatedInputs": [
{
"name": "",
"type": "BOOLEAN",
"value": ""
}
],
"error": {
"title": "",
"type": "",
"errors": [
{
"title": "",
"detail": "",
"field": "",
"type": ""
}
]
}
}
Show More