Tickets API
GET/api/v1/tickets/{id}/assets
Product availabilityAlgaPSA

List assets linked to a ticket

Returns assets associated with the path ticket ID in the authenticated tenant, read from asset_associations where entity_type is ticket, joined to assets and clients. Each row includes the asset fields plus the association relationship_type, association_notes, and linked_at, ordered by link time descending. The route is authenticated and tenant-scoped via ApiBaseController.authenticate + runWithTenant (RLS active); it enforces ticket:read, a per-ticket authorization-kernel check (assertTicketReadAllowed), AND asset:read because the response exposes asset records. The response uses the apiMiddleware envelope ({ data } with no top-level success field). It performs no asset existence check beyond the ticket authorization, so an authorized caller on a ticket with no linked assets gets 200 with an empty array.

RBAC · ticket

Path parameters

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

Response body

Success response 200 · schema TicketAssetListResponse

dataarray of TicketAssetRowRequired
Assets linked to the ticket via asset_associations, ordered by link time descending. Empty when no associations exist or the ticket is not found.
itemsobject
asset_idstring <uuid>Required
Primary key from assets.asset_id.
client_idstring <uuid>Required
Client UUID from assets.client_id.
asset_typestringRequired
Asset type stored in assets.asset_type.
asset_tagstringRequired
Tenant-specific asset tag.
namestringRequired
Asset display name.
statusstringRequired
Asset status.
location_idstring <uuid>Nullable
Client_locations.location_id link, when set.
locationstringNullable
Asset location, when recorded.
serial_numberstringNullable
Asset serial number, when recorded.
purchase_datestringNullable
Asset purchase date from assets.purchase_date.
warranty_end_datestringNullable
Warranty end date from assets.warranty_end_date.
created_atstring <date-time>Required
Asset creation timestamp.
updated_atstring <date-time>Required
Asset last update timestamp.
tenantstring <uuid>Required
Tenant UUID from assets.tenant; filtered to the authenticated request context.
client_namestring
Client name selected from the joined clients table.
warranty_statusstring
Computed from warranty_end_date by SQL CASE expression.
Enum: no_warrantyexpiredexpiring_soonactive
maintenance_statusstring
Optional computed maintenance status when present in service results.
extension_dataobject
relationshipsarray of object
Related asset rows included by getWithDetails after create.
itemsobject
documentsarray of object
Associated document rows included by getWithDetails after create.
itemsobject
maintenance_schedulesarray of object
Maintenance schedule rows included by getWithDetails after create.
itemsobject
_linksobject
HATEOAS links generated from the asset_id.
relationship_typestringRequired
Association type from asset_associations.relationship_type (e.g. affected, related).
association_notesstringNullable
Optional notes from asset_associations.notes.
linked_atstringNullable
When the asset was linked to the ticket, from asset_associations.created_at.
metaobject

Response codes

200
Linked assets returned successfully. Empty when the ticket has no linked assets.
401
x-api-key missing/invalid.
403
Caller lacks ticket:read (or per-ticket authorization) or asset:read.
404
Ticket not found / not authorized for the caller.
500
Unexpected error.