WorkGroup
A WorkGroup represents a functional grouping within an office. There are three types:
JOB: a job role / duty (e.g. welder, crane operator, warehouse worker)WORK_PLACE: a work phase / operational area (e.g. assembly line, painting department)HGROUP: a homogeneous exposure group (e.g. workers exposed to noise)
Work groups can contain people (WorkGroupPerson), resources like equipment, work environments, or substances (WorkGroupEntity), and suppliers (WorkGroupSupplier).
A work group can be subject to check actions on the compliance schedule.
In compliance schedule entries (ActionSubscription), the subscriber_type is WORK_GROUP
and the subscriber_id is the work_group_id.
Use this API to:
- Define job roles, work phases, or homogeneous groups for an office
- Get the
work_group_idneeded to create compliance schedule entries or certificates - Browse work groups for an office (filter by
office_id)
Supports historicization.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Authentication
Section titled “ Authentication ”OAuth2
Section titled “OAuth2 ”Security scheme type: oauth2
Flow type: password
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
AccessToken
Section titled “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
Operations
Section titled “Operations” POST /v2/work-group/index
Returns a paginated list of work groups.
Most useful filters:
office_id: all work groups in a specific officework_group_type: filter by type (JOB,WORK_PLACE, orHGROUP)name: search by name
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching work groups
object
object
Unique identifier. Used as subscriber_id (WORK_GROUP) or resource_id.
Type of work group.
The project (company) this work group belongs to.
Name of the project.
Name of the office.
Whether this work group is currently active.
Whether the parent office is currently active.
If true, includes historicized entries.
Example
{ "filter": { "office_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "work_group_type": "JOB" }, "per-page": 20, "page": 1, "sort": "name"}Responses
Section titled “ Responses ”List of work groups
object
Unique identifier. Used as subscriber_id (WORK_GROUP) or resource_id.
Type of work group.
The project (company) this work group belongs to.
Name of the project.
Name of the office.
Whether this work group is currently active.
Whether the parent office is currently active.
Headers
Section titled “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
create
Section titled “create” POST /v2/work-group/create
Creates a new work group in an office.
Requires name and office_id.
The work_group_id is auto-generated if not provided.
After creation, assign people via WorkGroupPerson, resources via WorkGroupEntity, and suppliers via WorkGroupSupplier.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Work group to create
object
Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: WORK_GROUP) in the compliance schedule and as resource_id in certificates.
Identifier code.
Name of the work group.
Optional description.
The office this work group belongs to. Pass the office_id.
Type of work group:
JOB: a job role or duty (e.g. welder, crane operator)WORK_PLACE: a work phase or operational area (e.g. assembly line)HGROUP: a homogeneous exposure group (e.g. workers exposed to noise)
Responses
Section titled “ Responses ”Work group created successfully
object
Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: WORK_GROUP) in the compliance schedule and as resource_id in certificates.
Identifier code.
Name of the work group.
Optional description.
The office this work group belongs to. Pass the office_id.
Type of work group:
JOB: a job role or duty (e.g. welder, crane operator)WORK_PLACE: a work phase or operational area (e.g. assembly line)HGROUP: a homogeneous exposure group (e.g. workers exposed to noise)
GET /v2/work-group/view/{id}
Retrieves a single work group by its ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The work_group_id to retrieve.
Responses
Section titled “ Responses ”Work group found
object
Unique identifier. Used as subscriber_id (WORK_GROUP) or resource_id.
Type of work group.
The project (company) this work group belongs to.
Name of the project.
Name of the office.
Whether this work group is currently active.
Whether the parent office is currently active.
Work group not found
update
Section titled “update” PUT /v2/work-group/update/{id}
Updates an existing work group.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The work_group_id to update.
Request Body required
Section titled “Request Body required ”Fields to update
object
Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: WORK_GROUP) in the compliance schedule and as resource_id in certificates.
Identifier code.
Name of the work group.
Optional description.
The office this work group belongs to. Pass the office_id.
Type of work group:
JOB: a job role or duty (e.g. welder, crane operator)WORK_PLACE: a work phase or operational area (e.g. assembly line)HGROUP: a homogeneous exposure group (e.g. workers exposed to noise)
Responses
Section titled “ Responses ”Work group updated successfully
object
Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: WORK_GROUP) in the compliance schedule and as resource_id in certificates.
Identifier code.
Name of the work group.
Optional description.
The office this work group belongs to. Pass the office_id.
Type of work group:
JOB: a job role or duty (e.g. welder, crane operator)WORK_PLACE: a work phase or operational area (e.g. assembly line)HGROUP: a homogeneous exposure group (e.g. workers exposed to noise)
Work group not found
delete
Section titled “delete” DELETE /v2/work-group/delete/{id}
Deletes a work group.
If force=false (default), the response lists child entities (people, resources, suppliers).
If force=true, the work group and all related entities are deleted.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The work_group_id to delete.
Query Parameters
Section titled “Query Parameters ”If true, deletes the work group and all child entities.
Responses
Section titled “ Responses ”Work group deleted successfully
Preview of entities that would be deleted (returned when force=false)