asset-object-references
3 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
Get inbound and outbound references for an asset object#
GET
/spaces/{spaceId}/assets/objects/{id}/referencesTokenReturns two arrays: outbound (this object points to others) and inbound (others point to this object). Each reference includes joined relation_type, source, and target object details.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Source object UUID |
Antworten
- 200Grouped inbound and outbound references returned
- 401Not authenticated
- 403Missing view_assets permission or module disabled
- 404Object not found
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/objects/{id}/references" \
-H "Authorization: Bearer $XISUITE_TOKEN"Create a directed reference from this object to another#
POST
/spaces/{spaceId}/assets/objects/{id}/referencesTokenBoth objects must be in the same space. Self-references and duplicate references are rejected.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Source object UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
target_object_idPflicht | string | UUID of the target object to link to |
attribute_id | object | UUID of the attribute definition that carries this reference (optional) |
relation_type_id | object | UUID of the relation type that describes the link (optional) |
Antworten
- 201Reference created
- 400Self-reference, cross-space reference, or validation error
- 401Not authenticated
- 403Missing edit_assets permission or module disabled
- 404Source or target object not found
- 409Reference already exists between these objects
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/objects/{id}/references" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"target_object_id":"…"}'Delete a reference between two objects#
DELETE
/spaces/{spaceId}/assets/objects/{id}/references/{referenceId}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Object UUID (source or target) |
referenceIdPflicht | Pfad | string | Reference UUID |
Antworten
- 200Reference deleted
- 401Not authenticated
- 403Missing edit_assets permission or module disabled
- 404Reference not found
Beispiel (cURL)
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/objects/{id}/references/{referenceId}" \
-H "Authorization: Bearer $XISUITE_TOKEN"