API reference · Assets
DELETE/api/v1/assets/maintenance/{scheduleId}

Delete asset maintenance schedule

Deletes a maintenance schedule by asset_maintenance_schedules.schedule_id for the authenticated tenant. The service scopes deletion by schedule_id and context.tenant and performs no existence check, so missing or cross-tenant IDs are silent no-ops. The controller intends to return 204 with no body, but currently constructs a JSON response with status 204, which can throw in NextResponse. In the current route wiring, req.context may also be absent because no route-level API-key auth wrapper sets it, causing a 500 before deletion.

RBAC · asset

Path parameters

scheduleIdstring <uuid>Required
Maintenance schedule UUID from asset_maintenance_schedules.schedule_id.

Response codes

204
Maintenance schedule deleted successfully, or it was already absent.
401
x-api-key is missing at middleware.
403
Authenticated request context lacks permission to delete or update asset maintenance schedules when auth wiring is present.
500
Unexpected error, including missing req.context or the current 204 JSON response construction issue.