Skip to content

Define Action

POST
/actions

Defines a new compliance Action (requirement) within the current Space. An Action has a type (training, health, check, ppe, maintenance), a target resource type (person, equipment, environment, substance), and a validity period. The targetResourceType is immutable after creation — it determines which Resources must fulfill this Action when both are assigned to the same Unit. The Space must be active.

X-Space-Id
required
string format: uuid

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

object
name
required

Name of the action

string
Example
Fire safety training
type
required

Action type

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

Type of resource this action targets (immutable)

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

Validity duration value

number
>= 1
Example
5
validityUnit
required

Validity duration unit

string
Allowed values: year month day
Example
year
object
id
required

Action ID

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

Space 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
targetResourceType
required

Target resource type

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

Validity duration value

number
Example
5
validityUnit
required

Validity duration unit

string
Allowed values: year month day
Example
year

Unauthorized — missing or invalid JWT

Forbidden — insufficient permissions

Validation failed — invalid input