API reference · Assets
GET/api/v1/assets/{id}/documents
Product availabilityAlgaPSA

List asset document associations

Returns document_associations rows for an asset in the authenticated tenant where entity_type is asset and entity_id is the path asset ID. The service joins documents to add original_filename, file_size, mime_type, and uploaded_at. It does not check whether the asset exists first, so nonexistent or cross-tenant asset IDs return 200 with an empty array. Response links currently point at /api/v2/assets paths. In the current route wiring, req.context may be absent because no route-level API-key auth wrapper sets it, causing a 500 before lookup.

RBAC · asset

Path parameters

idstring <uuid>Required
Asset UUID from assets.asset_id.

Response body

Success response 200 · schema AssetDocumentListResponse

successbooleanRequired
Enum: true
dataobjectRequired
dataarray of AssetDocumentAssociationRowRequired
Document association rows for the asset. Empty when no associations exist or the asset is not found.
itemsobject
association_idstring <uuid>Required
Primary key from document_associations.association_id.
entity_typestringRequired
Entity type stored on document_associations; always asset for these routes.
Enum: asset
entity_idstring <uuid>Required
Asset UUID from document_associations.entity_id.
document_idstring <uuid>Required
Document UUID from document_associations.document_id.
notesstringNullable
Optional association notes.
tenantstring <uuid>Required
Tenant UUID from document_associations.tenant.
created_atstring <date-time>
Association creation timestamp.
original_filenamestring
Original filename from the joined documents table, present on list responses.
file_sizenumber
File size in bytes from the joined documents table, present on list responses.
mime_typestring
MIME type from the joined documents table, present on list responses.
uploaded_atstring <date-time>
Document upload timestamp from the joined documents table, present on list responses.
_linksobjectRequired
Collection links. The controller currently points these at /api/v2/assets paths.
selfobject
hrefstringRequired
Target URL for the related operation.
methodstring
HTTP method for the link when supplied.
createobject
hrefstringRequired
Target URL for the related operation.
methodstring
HTTP method for the link when supplied.
parentobject
hrefstringRequired
Target URL for the related operation.
methodstring
HTTP method for the link when supplied.
metaobjectRequired
timestampstring <date-time>Required
versionstringRequired

Response codes

200
Document associations returned successfully. Empty when no associations exist or the asset is not found.
401
x-api-key is missing at middleware.
403
Authenticated request context lacks permission to read asset documents when auth wiring is present.
500
Unexpected error, including missing req.context in the current route wiring.