Replace the validation rules of an interface.
POST/api/v1/interfaces/{interface_id}/validations/replacecustom_fields:write
The whole list is replaced, in array order. Every data source must name an existing virtual view.
| Scope | custom_fields:write |
| Asynchronous | No |
| MCP tool | replace_interface_validations |
| Portal permissions | edit_interface_validation_rules |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
interface_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
If-Match | header | string | Optional |
Request body
| Content type | Type |
|---|---|
application/json | InterfaceValidationSetBodyInput |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json InterfaceValidationSet or object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
412 | precondition_failed | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
InterfaceValidation
| Field | Type | Required | Description |
|---|---|---|---|
data_sources | array of ValidationDataSource | Required | |
enabled | boolean | Required | |
failure_markdown | string or null | Required | |
name | string | Required | |
rule_expression | object or null | Required | The rule expression (format validation_rule, version 1). |
sort_order | integer | Required | The rule's position in the interface's rule list. ≥ -2147483648; ≤ 2147483647 |
InterfaceValidationSet
| Field | Type | Required | Description |
|---|---|---|---|
items | array of InterfaceValidation | Required |
InterfaceValidationSetBodyInput
| Field | Type | Required | Description |
|---|---|---|---|
validations | array of InterfaceValidationWriteInput | Optional | The whole rule list, in order. |
InterfaceValidationWriteInput
| Field | Type | Required | Description |
|---|---|---|---|
data_sources | array of ValidationDataSourceInput | Optional | |
enabled | boolean | Optional | |
failure_markdown | string or null | Optional | |
name | string | Required | |
rule_expression | object | Required |
ValidationDataSource
| Field | Type | Required | Description |
|---|---|---|---|
virtual_view_id | string | Required |
ValidationDataSourceInput
| Field | Type | Required | Description |
|---|---|---|---|
virtual_view_id | string | Optional |