Skip to content

Get Unit Compliance

GET
/compliance/units/{unitId}

Computes the compliance status for all Resource-Action pairs in a Unit. Returns one entry per (Resource, Action) obligation with its compliance status. Useful for viewing the full compliance picture of a Unit. Compliance is computed at query time, never persisted.

unitId
required
string
thresholdDays
required
number
X-Space-Id
required
string format: uuid

UUID of the target Space (tenant boundary). Validated against user access.

Array<object>
object
resource
required

Resource

object
id
required

Resource ID

string format: uuid
Example
550e8400-e29b-41d4-a716-446655440000
name
required

Resource name

string
Example
John Smith
type
required

Resource type

string
Allowed values: person equipment environment substance
Example
person
action
required

Action

object
id
required

Action ID

string format: uuid
Example
660e8400-e29b-41d4-a716-446655440000
name
required

Action name

string
Example
Fire safety training
type
required

Action type

string
Allowed values: training health check ppe maintenance
Example
training
status
required

Compliance status

string
Allowed values: compliant expiring non_compliant
Example
compliant

Unauthorized — missing or invalid JWT

Forbidden — insufficient permissions

Resource not found