asset-object-schemas
9 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
List all asset object schemas in a space#
GET
/spaces/{spaceId}/assets/schemasTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
sortFieldPflicht | Query | string | – |
sortDirectionPflicht | Query | string | – |
Antworten
- 200List of schemas returned
- 401Not authenticated
- 403Missing view_assets permission or module disabled
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/schemas" \
-H "Authorization: Bearer $XISUITE_TOKEN"Create a new asset object schema#
POST
/spaces/{spaceId}/assets/schemasTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
namePflicht | string | – |
object_keyPflicht | string | Short uppercase prefix for object keys, e.g. CMDB (1–12 uppercase letters/digits) |
description | string | – |
icon | string | Iconify ref, e.g. lucide:database |
color | string | – |
permissions | object | – |
settings | object | – |
is_archived | boolean | – |
Antworten
- 201Schema created successfully
- 400Validation error (invalid name, object_key format, etc.)
- 401Not authenticated
- 403Missing manage_assets permission or module disabled
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/schemas" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"…","object_key":"…"}'Get a single asset object schema by ID#
GET
/spaces/{spaceId}/assets/schemas/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Schema UUID |
Antworten
- 200Schema returned
- 401Not authenticated
- 403Missing view_assets permission or module disabled
- 404Schema not found
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/schemas/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Update an asset object schema (optimistic lock via version)#
PATCH
/spaces/{spaceId}/assets/schemas/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Schema UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
name | string | – |
description | string | – |
icon | string | Iconify ref, e.g. lucide:database |
color | string | – |
permissions | object | – |
settings | object | – |
is_archived | boolean | – |
version | number | Optimistic locking — current version from the DB |
Antworten
- 200Schema updated
- 400Validation error
- 401Not authenticated
- 403Missing manage_assets permission or module disabled
- 404Schema not found
- 409Version conflict — schema was updated by another request
Beispiel (cURL)
curl -X PATCH "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/schemas/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"…","description":"…","icon":"…"}'Delete an asset object schema (rejected if object types still exist)#
DELETE
/spaces/{spaceId}/assets/schemas/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Schema UUID |
Antworten
- 200Schema deleted
- 401Not authenticated
- 403Missing manage_assets permission or module disabled
- 404Schema not found
- 409Schema still has object types — delete them first
Beispiel (cURL)
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/schemas/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Archive an asset object schema (no new objects can be added)#
PATCH
/spaces/{spaceId}/assets/schemas/{id}/archiveTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Schema UUID |
Antworten
- 200Schema archived
- 401Not authenticated
- 403Missing manage_assets permission or module disabled
- 404Schema not found
Beispiel (cURL)
curl -X PATCH "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/schemas/{id}/archive" \
-H "Authorization: Bearer $XISUITE_TOKEN"Upload or replace the image for a schema (max 5 MB)#
POST
/spaces/{spaceId}/assets/schemas/{id}/imageTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Schema UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
filePflicht | string (binary) | Image file (max 5 MB, jpeg/png/gif/webp/svg) |
Antworten
- 201Image uploaded; schema returned with image_path set
- 400Missing file, invalid type, or file too large
- 401Not authenticated
- 403Missing manage_assets permission or module disabled
- 404Schema not found
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/schemas/{id}/image" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-F "file=@./datei.pdf"Remove the custom image from a schema#
DELETE
/spaces/{spaceId}/assets/schemas/{id}/imageTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Schema UUID |
Antworten
- 200Image removed; schema returned with image_path null
- 401Not authenticated
- 403Missing manage_assets permission or module disabled
- 404Schema not found
Beispiel (cURL)
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/schemas/{id}/image" \
-H "Authorization: Bearer $XISUITE_TOKEN"Apply a manual drag order to the schemas in a space#
PUT
/spaces/{spaceId}/assets/schemas/reorderTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
itemsPflicht | ReorderObjectSchemaItemDto[] | Every schema the client is displaying, in its new order. Sending the whole list avoids translating an index from a filtered view. |
items[].idPflicht | string | Schema UUID |
items[].sort_orderPflicht | number | Zero-based position in the list |
Antworten
- 200Order applied
- 401Not authenticated
- 403Missing manage_assets permission or module disabled
Beispiel (cURL)
curl -X PUT "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/schemas/reorder" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"items":[]}'