WorkGroupEntity
A WorkGroupEntity represents the assignment of a resource (equipment, work environment, or substance) to a work group.
The entity_id field is the resource ID and the entity_type specifies its type:
EQUIPMENT: an equipment item (office_equipment_id)WORK_ENVIRONMENT: a work environment (office_work_environment_id)SUBSTANCE: a substance (office_substance_id)
Use this API to:
- Assign equipment, work environments, or substances to a work group
- Find all resources in a work group (filter by
work_group_id) - Find all work groups a resource belongs to (filter by
entity_id)
The combination of entity_id + work_group_id must be unique.
Optionally, exposure time can be recorded (time_spent_measure + unit_of_measure_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-entity/index
Returns a paginated list of resource-work group assignments.
Most useful filters:
work_group_id: all resources in a specific work groupentity_id: all work groups a resource belongs toentity_type: filter by resource type (EQUIPMENT,WORK_ENVIRONMENT,SUBSTANCE)
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching
object
object
Name of the assigned resource.
Code of the assigned resource.
Whether this assignment is currently active.
Whether the parent entities are currently active.
If true, includes historicized entries.
Example
{ "filter": { "work_group_id": "3a4b5c6d-7e8f-9012-abcd-ef3456789012", "entity_type": "EQUIPMENT" }, "per-page": 20, "page": 1, "sort": "entity_name"}Responses
Section titled “ Responses ”List of resource-work group assignments
object
Name of the assigned resource.
Code of the assigned resource.
Whether this assignment is currently active.
Whether the parent entities are 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-entity/create
Assigns a resource to a work group.
Requires work_group_id, entity_id, and entity_type.
The work_group_entity_id is auto-generated if not provided.
What to pass as entity_id depends on the entity_type:
EQUIPMENT: pass theoffice_equipment_idWORK_ENVIRONMENT: pass theoffice_work_environment_idSUBSTANCE: pass theoffice_substance_id
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Assignment to create
object
Unique identifier. Auto-generated if not provided.
The work group. Pass the work_group_id from the WorkGroup API.
The resource to assign. What to pass depends on entity_type:
EQUIPMENT: pass theoffice_equipment_idWORK_ENVIRONMENT: pass theoffice_work_environment_idSUBSTANCE: pass theoffice_substance_id
Type of resource being assigned.
Optional description of the assignment.
Exposure time value. If specified, unit_of_measure_id is also required.
Unit of measure for the exposure time. Required if time_spent_measure is set.
Responses
Section titled “ Responses ”Resource assigned to work group successfully
object
Unique identifier. Auto-generated if not provided.
The work group. Pass the work_group_id from the WorkGroup API.
The resource to assign. What to pass depends on entity_type:
EQUIPMENT: pass theoffice_equipment_idWORK_ENVIRONMENT: pass theoffice_work_environment_idSUBSTANCE: pass theoffice_substance_id
Type of resource being assigned.
Optional description of the assignment.
Exposure time value. If specified, unit_of_measure_id is also required.
Unit of measure for the exposure time. Required if time_spent_measure is set.
GET /v2/work-group-entity/view/{id}
Retrieves a single assignment by its ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The work_group_entity_id to retrieve.
Responses
Section titled “ Responses ”Assignment found
object
Name of the assigned resource.
Code of the assigned resource.
Whether this assignment is currently active.
Whether the parent entities are currently active.
Assignment not found
update
Section titled “update” PUT /v2/work-group-entity/update/{id}
Updates an existing assignment.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The work_group_entity_id to update.
Request Body required
Section titled “Request Body required ”Fields to update
object
Unique identifier. Auto-generated if not provided.
The work group. Pass the work_group_id from the WorkGroup API.
The resource to assign. What to pass depends on entity_type:
EQUIPMENT: pass theoffice_equipment_idWORK_ENVIRONMENT: pass theoffice_work_environment_idSUBSTANCE: pass theoffice_substance_id
Type of resource being assigned.
Optional description of the assignment.
Exposure time value. If specified, unit_of_measure_id is also required.
Unit of measure for the exposure time. Required if time_spent_measure is set.
Responses
Section titled “ Responses ”Assignment updated successfully
object
Unique identifier. Auto-generated if not provided.
The work group. Pass the work_group_id from the WorkGroup API.
The resource to assign. What to pass depends on entity_type:
EQUIPMENT: pass theoffice_equipment_idWORK_ENVIRONMENT: pass theoffice_work_environment_idSUBSTANCE: pass theoffice_substance_id
Type of resource being assigned.
Optional description of the assignment.
Exposure time value. If specified, unit_of_measure_id is also required.
Unit of measure for the exposure time. Required if time_spent_measure is set.
Assignment not found
delete
Section titled “delete” DELETE /v2/work-group-entity/delete/{id}
Deletes a resource-work group assignment.
If force=false (default), the response lists child entities.
If force=true, the assignment and related entities are deleted.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The work_group_entity_id to delete.
Query Parameters
Section titled “Query Parameters ”If true, deletes the assignment and all child entities.
Responses
Section titled “ Responses ”Assignment deleted successfully
Preview of entities that would be deleted (returned when force=false)