Skip to content

WorkEnvironment

A WorkEnvironment represents a work environment registered in an office. Examples: warehouse, chemical lab, welding area, underground site.

Belongs to an office and can be subject to maintenance or check actions on the compliance schedule (ActionSubscription with subscriber_type: WORK_ENVIRONMENT).

Use this API to:

  • Register work environments present in an office
  • Get the office_work_environment_id needed to create compliance schedule entries or certificates
  • Browse work environments for an office (filter by office_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-environment/index

Returns a paginated list of work environments.

Most useful filters:

  • office_id: all work environments in a specific office
  • name: search by name

Parameters for searching work environments

object
filter
object
office_work_environment_id

Unique identifier. Used as subscriber_id (WORK_ENVIRONMENT) or resource_id.

string format: uuid
office_id
string format: uuid
project_id
string format: uuid
work_environment_id
string format: uuid
code
string
name
string
description
string
office_name

Name of the office.

string
project_name

Name of the project.

string
project_type
string
Allowed values: safety template
category

Work environment category (from catalog if linked).

string
owned_active

Whether this work environment is currently active.

boolean
nullable
parent_active

Whether the parent office is currently active.

boolean
nullable
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort
string
Allowed values: code name office_name project_name
history

If true, includes historicized entries.

boolean
Example
{
"filter": {
"office_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"per-page": 20,
"page": 1,
"sort": "name"
}

List of work environments

Array<object>
object
office_work_environment_id

Unique identifier. Used as subscriber_id (WORK_ENVIRONMENT) or resource_id.

string format: uuid
office_id
string format: uuid
project_id
string format: uuid
work_environment_id
string format: uuid
code
string
name
string
description
string
office_name

Name of the office.

string
project_name

Name of the project.

string
project_type
string
Allowed values: safety template
category

Work environment category (from catalog if linked).

string
owned_active

Whether this work environment is currently active.

boolean
nullable
parent_active

Whether the parent office is 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-environment/create

Registers a new work environment in an office.

Requires office_id, project_id, and name. The office_work_environment_id is auto-generated if not provided.

Work environment to register

object
office_work_environment_id

Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: WORK_ENVIRONMENT) in the compliance schedule and as resource_id in certificates.

string format: uuid
office_id
required

The office this work environment belongs to. Pass the office_id.

string format: uuid
work_environment_id

Optional reference to a work environment model from the catalog (template).

string format: uuid
code

Identifier code.

string
<= 45 characters
name
required

Name of the work environment.

string
<= 255 characters
description

Optional description.

string
nullable
project_id
required

The project (company). Pass the project_id.

string format: uuid

Work environment registered successfully

object
office_work_environment_id

Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: WORK_ENVIRONMENT) in the compliance schedule and as resource_id in certificates.

string format: uuid
office_id
required

The office this work environment belongs to. Pass the office_id.

string format: uuid
work_environment_id

Optional reference to a work environment model from the catalog (template).

string format: uuid
code

Identifier code.

string
<= 45 characters
name
required

Name of the work environment.

string
<= 255 characters
description

Optional description.

string
nullable
project_id
required

The project (company). Pass the project_id.

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

Retrieves a single work environment by its ID.

id
required
string format: uuid

The office_work_environment_id to retrieve.

Work environment found

object
office_work_environment_id

Unique identifier. Used as subscriber_id (WORK_ENVIRONMENT) or resource_id.

string format: uuid
office_id
string format: uuid
project_id
string format: uuid
work_environment_id
string format: uuid
code
string
name
string
description
string
office_name

Name of the office.

string
project_name

Name of the project.

string
project_type
string
Allowed values: safety template
category

Work environment category (from catalog if linked).

string
owned_active

Whether this work environment is currently active.

boolean
nullable
parent_active

Whether the parent office is currently active.

boolean
nullable

Work environment not found

PUT
/v2/work-environment/update/{id}

Updates an existing work environment.

id
required
string format: uuid

The office_work_environment_id to update.

Fields to update

object
office_work_environment_id

Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: WORK_ENVIRONMENT) in the compliance schedule and as resource_id in certificates.

string format: uuid
office_id
required

The office this work environment belongs to. Pass the office_id.

string format: uuid
work_environment_id

Optional reference to a work environment model from the catalog (template).

string format: uuid
code

Identifier code.

string
<= 45 characters
name
required

Name of the work environment.

string
<= 255 characters
description

Optional description.

string
nullable
project_id
required

The project (company). Pass the project_id.

string format: uuid

Work environment updated successfully

object
office_work_environment_id

Unique identifier. Auto-generated if not provided. Used as subscriber_id (with subscriber_type: WORK_ENVIRONMENT) in the compliance schedule and as resource_id in certificates.

string format: uuid
office_id
required

The office this work environment belongs to. Pass the office_id.

string format: uuid
work_environment_id

Optional reference to a work environment model from the catalog (template).

string format: uuid
code

Identifier code.

string
<= 45 characters
name
required

Name of the work environment.

string
<= 255 characters
description

Optional description.

string
nullable
project_id
required

The project (company). Pass the project_id.

string format: uuid

Work environment not found

DELETE
/v2/work-environment/delete/{id}

Deletes a work environment.

If force=false (default), the response lists child entities. If force=true, the work environment and all related entities are deleted.

id
required
string format: uuid

The office_work_environment_id to delete.

force
boolean

If true, deletes the work environment and all child entities.

Work environment deleted successfully

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