List a database's validation rules
Returns the rules that run on every record write, in evaluation order, each with its condition formula, message, severity and the field its message is anchored to. Requires the `databases:read` permission.
Authorization
apiKey Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/workspaces/string/databases/string/validation-rules"{ "data": [ { "id": "string", "workspaceId": "string", "databaseId": "string", "label": "string", "condition": "string", "message": "string", "severity": "block", "fieldKey": "string", "enabled": true, "order": 0, "createdAt": "string", "updatedAt": "string" } ]}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}Delete a button from a database
Removes the button and returns the deleted definition; the action it pointed at is left alone. Requires the `databases:write` permission and responds with not-found for an unknown button. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.
Add a validation rule to a database
Creates a rule whose `condition` formula must evaluate true for a record to be valid: `block` severity refuses the write and surfaces `message`, while `warn` lets the write through and records the message. Requires the `databases:write` permission and rejects a condition that does not parse. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.