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

Relations

List all relations

get

Returns relations visible to the current caller, optionally filtered by status.

Permissions: Visibility is checked only on the source side of each relation; the target's permissions are not independently evaluated.

  • When the source is a business concept, the caller must hold at least one of the following on the concept's domains (own domain plus shared domains):

    • 'View published business concepts'

    • 'View draft business concepts'

    • 'View deprecated business concepts'

    • 'View versioned business concepts'

    • 'View rejected business concepts'

    • 'View business concepts pending approval' When the concept is confidential, the caller must additionally hold 'Manage confidential business concepts' on the concept's domains.

  • When the source is an ingest, the caller must hold at least one of the following:

    • 'View published ingests'

    • 'View draft ingests'

    • 'View deprecated ingests'

    • 'View versioned ingests'

    • 'View rejected ingests'

    • 'View ingests pending approval'

  • When the source is a data structure, no permission clause applies and the relation is filtered out. The status-sensitive permission is generic: any of the listed view permissions grants access, without matching the resource's actual current status.

Query parameter:

  • status (optional, string) – Default: 'approved'. Includes relations whose status column is NULL (treated as approved). Use 'nil' to filter only relations without an explicit status.

The response includes hypermedia metadata for navigation and related actions. No pagination is applied; all matching visible relations are returned.

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 source_type must be either 'business_concept' or 'ingest'; 'data_structure' is not permitted as a source but it may be the target.

Request body:

  • Wrap fields inside a top-level relation object.

  • Required: source_id, source_type, target_id, target_type.

  • Optional:

    • context (object): additional metadata; defaults to %{}.

    • tag_ids (array of integers): associates a tag; only the first ID is used (tag_id is derived in the controller).

    • origin (string, nullable): relation origin; schema default is nil.

    • status (string, nullable): default is nil. On create, only 'pending' is accepted besides null/omission. Values 'approved' and 'rejected' cannot be set at creation; use POST /api/relations/status to transition a pending relation.

Permissions The permission required depends on the source resource type:

  • If source_type is 'business_concept': requires Manage business concept links permission.

  • If source_type is 'ingest': requires Manage ingest relations permission.

The system also validates that the target resource exists and is accessible. The response includes a Location header pointing to the created relation.

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.

Response parameters:

  • deleted: IDs successfully removed.

  • errors: error messages for IDs that could not be deleted (already deleted or user's permission failure). May be empty.

Requires administrative privileges (administrator or service account).

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 relations directly in the database (not the Elasticsearch index; use POST /api/relations/index_search for indexed search).

Two request modes:

  1. Resource-based mode – the three fields below must be provided together:

    • resource_id (integer) – ID of the anchor resource.

    • resource_type (string) – Type of the anchor resource. One of 'business_concept', 'ingest', or 'data_structure'.

    • related_to_type (string) – Type of the related resource on the opposite side of the relation. The query runs in both directions (anchor as source and anchor as target). However, only relations whose source is a business concept or an ingest are returned. Relations whose source is a data structure are silently filtered out, so for a data structure anchor only the direction where the anchor is the target is effective.

  2. General mode – any combination of source_id, source_type, target_id, target_type, status, and tag_id. Do not mix this mode with the three resource-based fields above.

Status filter (both modes):

  • status (string, optional) – Default: 'approved'. When the effective status is 'approved', relations whose status column is NULL are also returned (treated as approved). Use 'nil' to filter only relations without an explicit status.

Permissions: Visibility is checked only on the source side of each relation; the target's permissions are not independently evaluated.

  • When the source is a business concept, the caller must hold at least one of the following on the concept's domains (own domain plus shared domains):

    • 'View published business concepts'

    • 'View draft business concepts'

    • 'View deprecated business concepts'

    • 'View versioned business concepts'

    • 'View rejected business concepts'

    • 'View business concepts pending approval' Additionally, when the concept is confidential, the caller must hold 'Manage confidential business concepts' on the concept's domains.

  • When the source is an ingest, the caller must hold at least one of the following on the ingest:

    • 'View published ingests'

    • 'View draft ingests'

    • 'View deprecated ingests'

    • 'View versioned ingests'

    • 'View rejected ingests'

    • 'View ingests pending approval'

  • When the source is a data structure, no permission clause applies and the relation is filtered out of the result. The status-sensitive permission is generic: any of the listed view permissions grants access, without matching the resource's actual current status.

Response:

  • data – array of relation objects with id, source_id, source_type, target_id, target_type, context, status, origin, tag/tags, tag_id, tag_type, and timestamps (inserted_at, updated_at, deleted_at, disabled_at, disabled_reason).

  • _actions / hypermedia – navigation metadata keyed to the anchor resource.

When related_to_type is 'business_concept' or 'ingest', the corresponding side of the relation's context is enriched with the cached name and version_id. When related_to_type is 'data_structure', no enrichment is applied.

The search does not paginate; all matching visible relations are returned in a single response.

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 a single relation by ID.

Permissions: Visibility is checked only on the source side of the relation; the target's permissions are not independently evaluated.

  • When the source is a business concept, the caller must hold at least one of the following on the concept's domains (own domain plus shared domains):

    • 'View published business concepts'

    • 'View draft business concepts'

    • 'View deprecated business concepts'

    • 'View versioned business concepts'

    • 'View rejected business concepts'

    • 'View business concepts pending approval' When the concept is confidential, the caller must additionally hold 'Manage confidential business concepts' on the concept's domains.

  • When the source is an ingest, the caller must hold at least one of the following:

    • 'View published ingests'

    • 'View draft ingests'

    • 'View deprecated ingests'

    • 'View versioned ingests'

    • 'View rejected ingests'

    • 'View ingests pending approval'

  • When the source is a data structure, no permission clause applies and the relation is filtered out (even when requested by ID).

Response: Object with id, source_id, source_type, target_id, target_type, context, status, origin, tag/tags, tag_id, tag_type, and timestamps.

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

Soft-deletes a relation by setting deleted_at without removing the database row. The relation remains for audit/history but is excluded from default database and index searches (unless explicitly included via search with/document parameters). The operation is reversible only by a database restoration; there is no public API to restore a soft-deleted relation.

The source_type must be either 'business_concept' or 'ingest'; 'data_structure' is not permitted as a source but it may be the target.

Permissions Requires permission to manage links on the source resource of the relation:

  • If the source is a business concept: Manage business concept links permission.

  • If the source is an ingest: Manage ingest relations permission.

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