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

Search assets

Searches tenant assets with a required query term and optional field, asset type, status, client, extension-data, and limit parameters. The service searches assets scoped to context.tenant, joins clients for client_name, and optionally loads asset-type-specific extension data per result. The response is not paginated and includes HATEOAS links for each asset; the top-level search link currently points at /api/v2/assets/search. In the current route wiring, req.context may be absent because no route-level API-key auth wrapper sets it, causing a 500 before search.

RBAC · asset

Query parameters

querystringRequired
Required search term used in ILIKE clauses.
fieldsarray of stringOptional
Search fields. If omitted, the service searches asset_tag, name, serial_number, and location.
asset_typesarray of stringOptional
Optional asset type filters.
statusesarray of stringOptional
Optional status filters.
client_idsarray of stringOptional
Optional client UUID filters.
include_extension_datastringOptional
When true, the service fetches asset-type-specific extension data for every result.
limitstringOptional
Maximum result count as a query string. Must parse to 1 through 100; defaults to 25.

Response body

Success response 200 · schema AssetSearchResponse

successbooleanRequired
Enum: true
dataobjectRequired
dataarray of AssetResourceRequired
Matching assets with HATEOAS links.
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.
_linksobjectRequired
Search collection link. The controller currently points this at /api/v2/assets/search.
selfobject
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
Matching assets returned successfully.
400
Query parameter validation failed, including missing required query.
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.