asset-object-attachments
6 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
List all file attachments for an asset object#
GET
/spaces/{spaceId}/assets/objects/{id}/attachmentsTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Object UUID |
Antworten
- 200Attachment list returned (includes uploader user details)
- 401Not authenticated
- 403Missing view_assets permission or module disabled
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/objects/{id}/attachments" \
-H "Authorization: Bearer $XISUITE_TOKEN"Upload a file attachment to an asset object#
POST
/spaces/{spaceId}/assets/objects/{id}/attachmentsTokenMultipart upload. Maximum file size: 50 MB. Supported types: images, PDF, Word, Excel, plain text, CSV.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Object UUID |
schemaIdPflicht | Query | string | Schema UUID (used for history logging) |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
filePflicht | string (binary) | File to upload (max 50 MB) |
Antworten
- 201File uploaded and attachment record created
- 400Missing file, invalid mime type, or file too large
- 401Not authenticated
- 403Missing edit_assets permission or module disabled
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/objects/{id}/attachments" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-F "file=@./datei.pdf"Get a signed download URL for an attachment (valid for 1 hour)#
GET
/spaces/{spaceId}/assets/objects/{id}/attachments/{attachmentId}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Object UUID |
attachmentIdPflicht | Pfad | string | Attachment UUID |
Antworten
- 200Signed download URL returned (1-hour expiry)
- 401Not authenticated
- 403Missing view_assets permission or module disabled
- 404Attachment not found
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/objects/{id}/attachments/{attachmentId}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Delete an attachment and remove its file from storage#
DELETE
/spaces/{spaceId}/assets/objects/{id}/attachments/{attachmentId}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Object UUID |
attachmentIdPflicht | Pfad | string | Attachment UUID |
Antworten
- 200Attachment and storage file deleted
- 401Not authenticated
- 403Missing edit_assets permission or module disabled
- 404Attachment not found
Beispiel (cURL)
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/objects/{id}/attachments/{attachmentId}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Permanent download redirect for an attachment (302 → signed URL)#
GET
/spaces/{spaceId}/assets/objects/{id}/attachments/{attachmentId}/downloadTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Object UUID |
attachmentIdPflicht | Pfad | string | Attachment UUID |
Antworten
- 302Redirect to signed download URL
- 404Attachment not found
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/objects/{id}/attachments/{attachmentId}/download" \
-H "Authorization: Bearer $XISUITE_TOKEN"List all versions of an attachment (same filename)#
GET
/spaces/{spaceId}/assets/objects/{id}/attachments/{attachmentId}/versionsTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | Space UUID |
idPflicht | Pfad | string | Object UUID |
attachmentIdPflicht | Pfad | string | Attachment UUID (any version) |
Antworten
- 200All versions returned, newest first
- 404Attachment not found
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/assets/objects/{id}/attachments/{attachmentId}/versions" \
-H "Authorization: Bearer $XISUITE_TOKEN"