Skip to content

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

Security scheme type: oauth2

Flow type: password

Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token

Security scheme type: apiKey

Query parameter name: access-token

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 group
  • entity_id: all work groups a resource belongs to
  • entity_type: filter by resource type (EQUIPMENT, WORK_ENVIRONMENT, SUBSTANCE)

Parameters for searching

object
filter
object
work_group_entity_id
string format: uuid
work_group_id
string format: uuid
entity_id
string format: uuid
entity_type
string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE
description
string
time_spent_measure
string
unit_of_measure_id
string format: uuid
entity_name

Name of the assigned resource.

string
entity_code

Code of the assigned resource.

string
work_group_code
string
work_group_name
string
work_group_type
string
Allowed values: WORK_PLACE HGROUP JOB
unit_of_measure_code
string
unit_of_measure_name
string
office_id
string format: uuid
office_name
string
office_code
string
project_id
string format: uuid
project_name
string
project_type
string
Allowed values: safety template
owned_active

Whether this assignment is currently active.

boolean
nullable
parent_active

Whether the parent entities are currently active.

boolean
nullable
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort
string
Allowed values: work_group_code work_group_name work_group_type entity_name entity_code entity_type
history

If true, includes historicized entries.

boolean
Example
{
"filter": {
"work_group_id": "3a4b5c6d-7e8f-9012-abcd-ef3456789012",
"entity_type": "EQUIPMENT"
},
"per-page": 20,
"page": 1,
"sort": "entity_name"
}

List of resource-work group assignments

Array<object>
object
work_group_entity_id
string format: uuid
work_group_id
string format: uuid
entity_id
string format: uuid
entity_type
string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE
description
string
time_spent_measure
string
unit_of_measure_id
string format: uuid
entity_name

Name of the assigned resource.

string
entity_code

Code of the assigned resource.

string
work_group_code
string
work_group_name
string
work_group_type
string
Allowed values: WORK_PLACE HGROUP JOB
unit_of_measure_code
string
unit_of_measure_name
string
office_id
string format: uuid
office_name
string
office_code
string
project_id
string format: uuid
project_name
string
project_type
string
Allowed values: safety template
owned_active

Whether this assignment is currently active.

boolean
nullable
parent_active

Whether the parent entities are currently active.

boolean
nullable
X-Pagination-Current-Page
integer

Current page

X-Pagination-Page-Count
integer

Total number of pages

X-Pagination-Per-Page
integer

Number of items per page

X-Pagination-Total-Count
integer

Total number of items

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 the office_equipment_id
  • WORK_ENVIRONMENT: pass the office_work_environment_id
  • SUBSTANCE: pass the office_substance_id

Assignment to create

object
work_group_entity_id

Unique identifier. Auto-generated if not provided.

string format: uuid
work_group_id
required

The work group. Pass the work_group_id from the WorkGroup API.

string format: uuid
entity_id
required

The resource to assign. What to pass depends on entity_type:

  • EQUIPMENT: pass the office_equipment_id
  • WORK_ENVIRONMENT: pass the office_work_environment_id
  • SUBSTANCE: pass the office_substance_id
string format: uuid
entity_type
required

Type of resource being assigned.

string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE
description

Optional description of the assignment.

string
nullable <= 4000 characters
time_spent_measure

Exposure time value. If specified, unit_of_measure_id is also required.

string
<= 50 characters
unit_of_measure_id

Unit of measure for the exposure time. Required if time_spent_measure is set.

string format: uuid

Resource assigned to work group successfully

object
work_group_entity_id

Unique identifier. Auto-generated if not provided.

string format: uuid
work_group_id
required

The work group. Pass the work_group_id from the WorkGroup API.

string format: uuid
entity_id
required

The resource to assign. What to pass depends on entity_type:

  • EQUIPMENT: pass the office_equipment_id
  • WORK_ENVIRONMENT: pass the office_work_environment_id
  • SUBSTANCE: pass the office_substance_id
string format: uuid
entity_type
required

Type of resource being assigned.

string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE
description

Optional description of the assignment.

string
nullable <= 4000 characters
time_spent_measure

Exposure time value. If specified, unit_of_measure_id is also required.

string
<= 50 characters
unit_of_measure_id

Unit of measure for the exposure time. Required if time_spent_measure is set.

string format: uuid
GET
/v2/work-group-entity/view/{id}

Retrieves a single assignment by its ID.

id
required
string format: uuid

The work_group_entity_id to retrieve.

Assignment found

object
work_group_entity_id
string format: uuid
work_group_id
string format: uuid
entity_id
string format: uuid
entity_type
string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE
description
string
time_spent_measure
string
unit_of_measure_id
string format: uuid
entity_name

Name of the assigned resource.

string
entity_code

Code of the assigned resource.

string
work_group_code
string
work_group_name
string
work_group_type
string
Allowed values: WORK_PLACE HGROUP JOB
unit_of_measure_code
string
unit_of_measure_name
string
office_id
string format: uuid
office_name
string
office_code
string
project_id
string format: uuid
project_name
string
project_type
string
Allowed values: safety template
owned_active

Whether this assignment is currently active.

boolean
nullable
parent_active

Whether the parent entities are currently active.

boolean
nullable

Assignment not found

PUT
/v2/work-group-entity/update/{id}

Updates an existing assignment.

id
required
string format: uuid

The work_group_entity_id to update.

Fields to update

object
work_group_entity_id

Unique identifier. Auto-generated if not provided.

string format: uuid
work_group_id
required

The work group. Pass the work_group_id from the WorkGroup API.

string format: uuid
entity_id
required

The resource to assign. What to pass depends on entity_type:

  • EQUIPMENT: pass the office_equipment_id
  • WORK_ENVIRONMENT: pass the office_work_environment_id
  • SUBSTANCE: pass the office_substance_id
string format: uuid
entity_type
required

Type of resource being assigned.

string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE
description

Optional description of the assignment.

string
nullable <= 4000 characters
time_spent_measure

Exposure time value. If specified, unit_of_measure_id is also required.

string
<= 50 characters
unit_of_measure_id

Unit of measure for the exposure time. Required if time_spent_measure is set.

string format: uuid

Assignment updated successfully

object
work_group_entity_id

Unique identifier. Auto-generated if not provided.

string format: uuid
work_group_id
required

The work group. Pass the work_group_id from the WorkGroup API.

string format: uuid
entity_id
required

The resource to assign. What to pass depends on entity_type:

  • EQUIPMENT: pass the office_equipment_id
  • WORK_ENVIRONMENT: pass the office_work_environment_id
  • SUBSTANCE: pass the office_substance_id
string format: uuid
entity_type
required

Type of resource being assigned.

string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE
description

Optional description of the assignment.

string
nullable <= 4000 characters
time_spent_measure

Exposure time value. If specified, unit_of_measure_id is also required.

string
<= 50 characters
unit_of_measure_id

Unit of measure for the exposure time. Required if time_spent_measure is set.

string format: uuid

Assignment not found

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.

id
required
string format: uuid

The work_group_entity_id to delete.

force
boolean

If true, deletes the assignment and all child entities.

Assignment deleted successfully

Preview of entities that would be deleted (returned when force=false)