List the relations touching a database
Returns every relation with an end on this database, including the database and field at the far end, both cardinalities, the configured delete behavior, and a `near` marker naming the end this database owns. Requires the `databases:read` permission.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringdatabaseId*stringSuccess
application/json- response
data*array<>curl -X GET 'https://api.snoze.dev/v1/workspaces/string/databases/string/relations'{ "data": [ { "id": "string", "workspaceId": "string", "label": "string", "fromDatabaseId": "string", "fromFieldId": "string", "fromCardinality": "one", "toDatabaseId": "string", "toFieldId": "string", "toCardinality": "one", "onDelete": "detach", "createdAt": "string", "updatedAt": "string", "near": "from" } ]}Preview what deleting a view would affect
Returns the blocks, automations and other references that depend on the view, with an overall status of `safe`, `needs_confirmation`, or `blocked`. Read-only. Requires the `databases:write` permission.
Update a relation's label and delete behavior
Renames the link and changes its `onDelete` behavior; the two ends, their fields and their cardinalities are immutable. Requires the `databases:write` permission on both databases the relation joins, and responds with not-found when the relation has no end on the database in the path. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.