For the complete documentation index, see llms.txt. This page is also available as Markdown.

Relations

List all relations

get

Retrieves a paginated list of all relations, optionally filtered by status. Default status is 'approved'.

Query parameters
statusstring · enumOptional

Filter by status. Default: 'approved'

Possible values:
Responses
200

OK

application/json
get/api/relations
GET /api/relations HTTP/1.1
Accept: */*
{
  "_actions": {
    "create": {
      "href": "/api/relations",
      "input": {},
      "method": "POST"
    },
    "search": {
      "href": "/api/relations/search",
      "input": {},
      "method": "POST"
    }
  },
  "data": [
    {
      "context": {},
      "deleted_at": null,
      "disabled_at": null,
      "disabled_reason": null,
      "id": 1,
      "inserted_at": "2025-01-01T00:00:00Z",
      "origin": null,
      "source_id": 123,
      "source_type": "business_concept",
      "status": null,
      "tag": null,
      "tag_id": null,
      "tag_type": null,
      "tags": [],
      "target_id": 456,
      "target_type": "data_field",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ]
}

Create a new relation

post

Creates a new relation between two resources. The relation can include context, tags, origin, and status information.

Body
Responses
201

Created

application/json
post/api/relations
POST /api/relations HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 179

{
  "relation": {
    "context": {
      "some": "value"
    },
    "origin": "manual",
    "source_id": 123,
    "source_type": "business_concept",
    "status": null,
    "tag_ids": [
      1
    ],
    "target_id": 456,
    "target_type": "data_field"
  }
}
{
  "data": {
    "context": {},
    "deleted_at": null,
    "disabled_at": null,
    "disabled_reason": null,
    "id": 1,
    "inserted_at": "2025-01-01T00:00:00Z",
    "origin": null,
    "source_id": 123,
    "source_type": "business_concept",
    "status": null,
    "tag": null,
    "tag_id": null,
    "tag_type": null,
    "tags": [],
    "target_id": 456,
    "target_type": "data_field",
    "updated_at": "2025-01-01T00:00:00Z"
  }
}

Hard delete multiple relations

delete

Permanently removes multiple relations from the database based on a list of IDs. This operation is irreversible and requires administrative privileges.

Body
idsinteger[]Required

List of relation IDs to permanently delete

Responses
200

OK

application/json
delete/api/relations/hard_delete
DELETE /api/relations/hard_delete HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "ids": [
    1,
    2,
    3
  ]
}
{
  "data": {
    "deleted": [
      1,
      2
    ],
    "errors": []
  }
}

Search relations

post

Searches for relations based on resource IDs and types, with optional status filtering. Supports both resource-based and parameter-based search modes.

Body
related_to_typestringOptional

Related resource type (required for resource-based search)

resource_idintegerOptional

Root resource ID for search (required for resource-based search)

resource_typestringOptional

Root resource type (required for resource-based search)

source_idintegerOptional

Source ID (alternative search)

source_typestringOptional

Source type (alternative search)

statusstring · enum · nullableOptional

Status filter (defaults to 'approved')

Possible values:
Responses
200

OK

application/json
post/api/relations/search
POST /api/relations/search HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 105

{
  "related_to_type": "data_field",
  "resource_id": 123,
  "resource_type": "business_concept",
  "status": "approved"
}
{
  "_actions": {
    "create": {
      "href": "/api/relations",
      "input": {},
      "method": "POST"
    },
    "search": {
      "href": "/api/relations/search",
      "input": {},
      "method": "POST"
    }
  },
  "data": [
    {
      "context": {},
      "deleted_at": null,
      "disabled_at": null,
      "disabled_reason": null,
      "id": 1,
      "inserted_at": "2025-01-01T00:00:00Z",
      "origin": null,
      "source_id": 123,
      "source_type": "business_concept",
      "status": null,
      "tag": null,
      "tag_id": null,
      "tag_type": null,
      "tags": [],
      "target_id": 456,
      "target_type": "data_field",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ]
}

Get a relation by ID

get

Retrieves the full details of a single relation by its unique identifier, including associated tags and enriched attributes.

Path parameters
idintegerRequired

Relation ID

Responses
200

OK

application/json
get/api/relations/{id}
GET /api/relations/{id} HTTP/1.1
Accept: */*
{
  "data": {
    "context": {},
    "deleted_at": null,
    "disabled_at": null,
    "disabled_reason": null,
    "id": 1,
    "inserted_at": "2025-01-01T00:00:00Z",
    "origin": null,
    "source_id": 123,
    "source_type": "business_concept",
    "status": null,
    "tag": null,
    "tag_id": null,
    "tag_type": null,
    "tags": [],
    "target_id": 456,
    "target_type": "data_field",
    "updated_at": "2025-01-01T00:00:00Z"
  }
}

Soft delete a relation

delete

Performs a soft delete of a relation by setting its deleted_at timestamp, making it invisible in search results but retaining the data for auditing.

Path parameters
idintegerRequired

Relation ID

Responses
204

Relation deleted

No content

delete/api/relations/{id}
DELETE /api/relations/{id} HTTP/1.1
Accept: */*

No content

Last updated