API reference · Assets
GET/api/v1/assets
Product availabilityAlgaPSA

List assets

Lists assets for the authenticated tenant with pagination, sorting, and asset filters. The controller validates query parameters with assetListQuerySchema, calls requireRequestContext, queries assets filtered by assets.tenant, joins clients for client_name, computes warranty_status, and adds HATEOAS links from asset_id. In the current route wiring, the edge middleware only checks x-api-key presence and the route is not wrapped with withApiKeyAuth or ApiBaseController authentication, so req.context may be absent and produce a 500 INTERNAL_ERROR before the intended tenant-scoped list can run.

RBAC · asset

Query parameters

pagestringOptional
Page number as a query string. Defaults to 1 after validation.
limitstringOptional
Page size as a query string. Must parse to 1 through 100; defaults to 25.
sortstringOptional
Sort column. Defaults to created_at.
orderstringOptional
Sort direction. Defaults to desc.
searchstringOptional
General search filter accepted by the shared filter schema. The current AssetService.list implementation does not apply this filter.
created_fromstring <date-time>Optional
Accepted by validation, but not currently applied by AssetService.list.
created_tostring <date-time>Optional
Accepted by validation, but not currently applied by AssetService.list.
updated_fromstring <date-time>Optional
Accepted by validation, but not currently applied by AssetService.list.
updated_tostring <date-time>Optional
Accepted by validation, but not currently applied by AssetService.list.
is_activestringOptional
Accepted by validation, but not currently applied by AssetService.list.
asset_tagstringOptional
Partial asset tag match using ILIKE.
namestringOptional
Partial asset name match using ILIKE.
client_idstring <uuid>Optional
Client UUID from clients.client_id.
asset_typestringOptional
Asset type stored in assets.asset_type.
statusstringOptional
Exact asset status match.
locationstringOptional
Partial location match using ILIKE.
client_namestringOptional
Partial client name match; joins clients on client_id and tenant.
has_warrantystringOptional
true requires warranty_end_date to be non-null; false requires it to be null.
warranty_expiredstringOptional
true filters warranty_end_date before now; false filters future warranty dates or no warranty.
maintenance_duestringOptional
Accepted by validation, but not currently applied by AssetService.list.
purchase_date_fromstring <date-time>Optional
Filter purchase_date greater than or equal to this timestamp.
purchase_date_tostring <date-time>Optional
Filter purchase_date less than or equal to this timestamp.
warranty_end_fromstring <date-time>Optional
Filter warranty_end_date greater than or equal to this timestamp.
warranty_end_tostring <date-time>Optional
Filter warranty_end_date less than or equal to this timestamp.

Response body

Success response 200 · schema AssetListResponse

successbooleanRequired
Indicates the controller returned a successful response envelope.
Enum: true
dataobjectRequired
dataarray of AssetResourceRequired
Asset records for the requested page.
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.
Enum: workstationnetwork_deviceservermobile_deviceprinterunknown
asset_tagstringRequired
Tenant-specific asset tag.
namestringRequired
Asset display name.
statusstringRequired
Asset status.
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.
paginationobjectRequired
pageintegerRequired
Current page number.
limitintegerRequired
Page size.
totalintegerRequired
Total matching asset count.
totalPagesintegerRequired
Total number of pages calculated from total and limit.
_linksobjectRequired
Collection links returned by ApiAssetController.list. These currently point 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.
searchobject
hrefstringRequired
Target URL for the related operation.
methodstring
HTTP method for the link when supplied.
exportobject
hrefstringRequired
Target URL for the related operation.
methodstring
HTTP method for the link when supplied.
statsobject
hrefstringRequired
Target URL for the related operation.
methodstring
HTTP method for the link when supplied.
metaobjectRequired
timestampstring <date-time>Required
Response timestamp generated by createApiResponse/createErrorResponse.
versionstringRequired
API response version string.

Response codes

200
Paginated asset list returned successfully. The pagination and links are nested under the top-level data envelope.
400
Query parameter validation failed.
401
x-api-key is missing at middleware.
403
Authenticated request context lacks permission to read assets when auth wiring is present.
500
Unexpected error, including missing req.context in the current route wiring.