SnozeDevelopers
API referenceDatabases

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.

GET
/v1/workspaces/{workspaceId}/databases/{databaseId}/relations
AuthorizationBearer <token>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

In: header

Path Parameters

workspaceId*string
databaseId*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/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"    }  ]}