Relation Types
7 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
List relation types for the organization#
GET
/relation-typesTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
includeInactive | Query | string | Include inactive relation types |
Antworten
- 200Relation types returned
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/relation-types" \
-H "Authorization: Bearer $XISUITE_TOKEN"Create a relation type#
POST
/relation-typesTokenRequest-Body
| Name | Typ | Beschreibung |
|---|---|---|
organizationId | string | Legacy compatibility field. Ignored; organization is derived from auth context. |
namePflicht | string | |
outward_descriptionPflicht | string | Description shown for the outward direction |
inward_descriptionPflicht | string | Description shown for the inward direction |
name_i18n | object | |
outward_description_i18n | object | |
inward_description_i18n | object | |
color | object | |
icon | object | |
is_directional | boolean | |
is_active | boolean | |
sort_order | number |
Antworten
- 201Relation type created
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/relation-types" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Blocks","outward_description":"blocks","inward_description":"is blocked by"}'Get a relation type by ID#
GET
/relation-types/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Antworten
- 200Relation type returned
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/relation-types/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Update a relation type (system types immutable)#
PUT
/relation-types/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
name | string | |
outward_description | string | – |
inward_description | string | – |
name_i18n | object | – |
outward_description_i18n | object | – |
inward_description_i18n | object | – |
color | object | – |
icon | object | – |
is_directional | boolean | – |
is_active | boolean | – |
sort_order | number | – |
Antworten
- 200Relation type updated
Beispiel (cURL)
curl -X PUT "https://xapi.ambertech.cloud/api/v1/relation-types/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Blocks","outward_description":"…","inward_description":"…"}'Patch action: toggle_active, duplicate#
PATCH
/relation-types/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
actionPflicht | string | Werte: |
name | string | Legacy PATCH compatibility: partial update when action is omitted. |
outward_description | string | Legacy PATCH compatibility: partial update when action is omitted. |
inward_description | string | Legacy PATCH compatibility: partial update when action is omitted. |
name_i18n | object | – |
outward_description_i18n | object | – |
inward_description_i18n | object | – |
color | object | – |
icon | object | – |
is_directional | boolean | – |
is_active | boolean | For toggle_active |
sort_order | number | – |
organizationId | string | Legacy compatibility field. Ignored; organization is derived from auth context. |
newName | string | New name for duplicate action |
Antworten
- 200Action applied
Beispiel (cURL)
curl -X PATCH "https://xapi.ambertech.cloud/api/v1/relation-types/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action":"toggle_active"}'Delete a relation type (blocked if in use or system type)#
DELETE
/relation-types/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Antworten
- 200Relation type deleted
Beispiel (cURL)
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/relation-types/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Bulk reorder relation types#
PATCH
/relation-types/reorderTokenRequest-Body
| Name | Typ | Beschreibung |
|---|---|---|
itemsPflicht | ReorderItemDto[] | – |
Antworten
- 200Relation types reordered
Beispiel (cURL)
curl -X PATCH "https://xapi.ambertech.cloud/api/v1/relation-types/reorder" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"items":[]}'