Relationships


GET /{o}/{p}/relationships

List relationships

Keyset-paged page of stored relationship rows in this project (origin: "explicit"), including edges whose endpoints come from different import sources. Derived edges are computed rather than stored and cannot be ordered by an immutable key, so they are served whole by GET /relationships/derived.

Auth: Bearer token required · Permission: data:read

Path parameters

NameTypeDescription
ostring
pstring

Query parameters

NameTypeDescription
relationshipTypestringFilter by relationship type
statestringFilter by state
fromEntitystring(uuid)Filter by from-entity ID
toEntitystring(uuid)Filter by to-entity ID
fromEntityCellstringFilter by from-entity cell membership
toEntityCellstringFilter by to-entity cell membership
limitintegerMax results (1-2000)
cursorstringKeyset cursor from the previous page

Responses

StatusDescriptionSchema
200OKRelationshipPage
401UnauthorizedError
403ForbiddenError

GET /{o}/{p}/relationships/derived

List derived relationship edges

All derived edges in this project (origin: "derived"), computed from entity properties. Unpaged — derived edges have no immutable ordering key.

Auth: Bearer token required · Permission: data:read

Path parameters

NameTypeDescription
ostring
pstring

Query parameters

NameTypeDescription
relationshipTypestringFilter by relationship type
fromEntitystring(uuid)Filter by from-entity ID
toEntitystring(uuid)Filter by to-entity ID

Responses

StatusDescriptionSchema
200OKResolvedRelationshipList
401UnauthorizedError
403ForbiddenError

GET /{o}/{p}/relationships/{id}

Get a relationship by id

Auth: Bearer token required · Permission: data:read

Path parameters

NameTypeDescription
idstring(uuid)Relationship ID
ostring
pstring

Responses

StatusDescriptionSchema
200OKRelationship
401UnauthorizedError
403ForbiddenError
404Not FoundError

POST /{o}/{p}/relationships/{id}/finalize-deletion

Force-finalize a relationship deletion

Skip the remaining grace period and immediately finalize a relationship scheduled for deletion.

Auth: Bearer token required · Permission: relationships:finalize

Path parameters

NameTypeDescription
idstring(uuid)Relationship ID
ostring
pstring

Request body (application/json)

FieldTypeDescription
finalStatestringState to finalize into

Responses

StatusDescriptionSchema
200OKRelationship
401UnauthorizedError
403ForbiddenError
404Not FoundError
409ConflictError

Schemas

Error

FieldTypeDescription
errorstring(required)
codestring

Relationship

FieldTypeDescription
statestring(required)
labelsobject(required)
idstring(uuid)(required)
relationshipTypeNamestring(required)
fromEntityIdstring(required)
toEntityIdstring(required)
orgIdstring(required)
projectIdstring(required)
createdAtstring | string(required)
updatedAtstring | string(required)
deletionScheduledAtstring | string | null(required)
deletionGracePeriodSecondsinteger | null(required)

RelationshipPage

FieldTypeDescription
itemsRelationshipPageRow[](required)
nextCursorstring | nullCursor for the next page; null on the final page (required)

RelationshipPageRow

FieldTypeDescription
statestring(required)
labelsobject(required)
idstring(uuid)(required)
relationshipTypeNamestring(required)
fromEntityIdstring(required)
toEntityIdstring(required)
orgIdstring(required)
projectIdstring(required)
createdAtstring | string(required)
updatedAtstring | string(required)
deletionScheduledAtstring | string | null(required)
deletionGracePeriodSecondsinteger | null(required)
fromEntityNamestring(required)
toEntityNamestring(required)
originexplicit | derived(required)

ResolvedRelationshipList

Type: ResolvedRelationshipListRow[]

ResolvedRelationshipListRow

FieldTypeDescription
idstring(uuid) | null(required)
relationshipTypeNamestring(required)
fromEntityNamestring(required)
toEntityNamestring(required)
originexplicit | derived(required)
statestring | null(required)
labelsobject(required)
fromEntityIdstring | null(required)
toEntityIdstring | null(required)
orgIdstring | null(required)
projectIdstring | null(required)
createdAtstring | string | null(required)
updatedAtstring | string | null(required)
deletionScheduledAtstring | string | null(required)
deletionGracePeriodSecondsinteger | null(required)