API reference · Assets
GET/api/v1/assets/{id}/maintenance

List asset maintenance schedules

Returns maintenance schedule rows for the path asset ID in the authenticated tenant. The service filters asset_maintenance_schedules by asset_id and context.tenant and joins users to add assigned_user_name. It performs no asset existence check, 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 v1 asset 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 AssetMaintenanceScheduleListResponse

successbooleanRequired
Enum: true
dataobjectRequired
dataarray of AssetMaintenanceScheduleResourceRequired
Maintenance schedule rows for the asset. Empty when no schedules exist or the asset is not found.
itemsobject
schedule_idstring <uuid>Required
Primary key from asset_maintenance_schedules.schedule_id.
asset_idstring <uuid>Required
Asset UUID from asset_maintenance_schedules.asset_id.
schedule_typestring
Maintenance schedule type as used by ApiAssetController.
frequencystring
Recurrence frequency.
frequency_intervalnumberNullable
Frequency multiplier.
start_datestringNullable
Schedule start date/time.
end_datestringNullable
Schedule end date/time.
last_maintenancestringNullable
Last recorded maintenance date/time.
next_maintenancestringNullable
Next calculated maintenance date/time.
notesstringNullable
Free-text schedule notes.
assigned_tostring <uuid>Nullable
Assigned user UUID.
is_activeboolean
Whether the schedule is active.
schedule_configobjectNullable
Custom scheduling configuration.
created_atstring <date-time>
Creation timestamp.
updated_atstring <date-time>
Last update timestamp.
tenantstring <uuid>Required
Tenant UUID scoped from the request context.
_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.
historyobject
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
Response timestamp generated by createApiResponse/createErrorResponse.
versionstringRequired
API response version string.

Response codes

200
Maintenance schedules returned successfully.
401
x-api-key is missing at middleware.
403
Authenticated request context lacks permission to read asset maintenance schedules when auth wiring is present.
500
Unexpected error, including missing req.context in the current route wiring.