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

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

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

Path Parameters

workspaceId*string
databaseId*string

Response Body

Success

application/json
  1. response
data*array<>
Example Request
curl -X GET 'https://api.snoze.dev/v1/workspaces/string/databases/string/relations'
Example Response
{  "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"    }  ]}