Skip to content

IncidentResource

An IncidentResource represents a resource involved in an incident. Links an incident (Incident) to an office resource.

The entity_id field contains the resource ID and entity_type specifies its kind:

  • EQUIPMENT: an equipment item (office_equipment_id)
  • WORK_ENVIRONMENT: a work environment (office_work_environment_id)
  • SUBSTANCE: a substance (office_substance_id)
  • WORK_GROUP: a work group (work_group_id)
  • MATERIAL: a material type (material_id)
  • MATERIAL_ITEM: a material item (material_item_id)
  • ACTION: a preventive action (action_id)

Use this API to:

  • Register resources involved in an incident
  • Find all resources involved in an incident (filter by office_incident_id)
  • Find all incidents that involved a resource (filter by entity_id)
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/incident-resource/index

Returns a paginated list of resources involved in incidents.

Most useful filters:

  • office_incident_id: all resources involved in a specific incident
  • entity_id: all incidents that involved a specific resource
  • entity_type: filter by resource type

Parameters for searching

object
filter
object
office_incident_resource_id
string format: uuid
office_incident_id
string format: uuid
entity_id
string format: uuid
entity_type
string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE WORK_GROUP MATERIAL MATERIAL_ITEM ACTION
description
string
tenant_id
string format: uuid
subtenant_id
string format: uuid
entity_name

Name of the involved resource.

string
entity_code

Code of the involved resource.

string
nullable
incident_code
string
nullable
incident_name
string
incident_date
string format: date
incident_category
string
incident_status
string
Allowed values: new open closed
project_name
string
project_type
string
Allowed values: safety template
office_name
string
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort
string
Allowed values: entity_type entity_name incident_name office_name
Example
{
"filter": {
"office_incident_id": "5c6d7e8f-9012-3456-abcd-ef5678901234"
},
"per-page": 20,
"page": 1,
"sort": "entity_name"
}

List of involved resources

Array<object>
object
office_incident_resource_id
string format: uuid
office_incident_id
string format: uuid
entity_id
string format: uuid
entity_type
string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE WORK_GROUP MATERIAL MATERIAL_ITEM ACTION
description
string
tenant_id
string format: uuid
subtenant_id
string format: uuid
entity_name

Name of the involved resource.

string
entity_code

Code of the involved resource.

string
nullable
incident_code
string
nullable
incident_name
string
incident_date
string format: date
incident_category
string
incident_status
string
Allowed values: new open closed
project_name
string
project_type
string
Allowed values: safety template
office_name
string
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/incident-resource/create

Registers a resource involved in an incident.

Requires office_incident_id, entity_id, entity_type, subtenant_id (office_id), and tenant_id (project_id). The office_incident_resource_id is auto-generated if not provided.

What to pass as entity_id depends on entity_type:

  • EQUIPMENT: pass the office_equipment_id
  • WORK_ENVIRONMENT: pass the office_work_environment_id
  • SUBSTANCE: pass the office_substance_id
  • WORK_GROUP: pass the work_group_id
  • MATERIAL: pass the material_id
  • MATERIAL_ITEM: pass the material_item_id
  • ACTION: pass the action_id

Involved resource to register

object
office_incident_resource_id

Unique identifier. Auto-generated if not provided.

string format: uuid
office_incident_id
required

The incident. Pass the office_incident_id from the Incident API.

string format: uuid
entity_id
required

The involved resource. 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
  • WORK_GROUP: pass the work_group_id
  • MATERIAL: pass the material_id
  • MATERIAL_ITEM: pass the material_item_id
  • ACTION: pass the action_id
string format: uuid
entity_type
required

Type of involved resource.

string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE WORK_GROUP MATERIAL MATERIAL_ITEM ACTION
description

Description of the resource’s involvement.

string
nullable
tenant_id
required

The project (company). Pass the project_id.

string format: uuid
subtenant_id
required

The office. Pass the office_id.

string format: uuid

Involved resource registered successfully

object
office_incident_resource_id

Unique identifier. Auto-generated if not provided.

string format: uuid
office_incident_id
required

The incident. Pass the office_incident_id from the Incident API.

string format: uuid
entity_id
required

The involved resource. 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
  • WORK_GROUP: pass the work_group_id
  • MATERIAL: pass the material_id
  • MATERIAL_ITEM: pass the material_item_id
  • ACTION: pass the action_id
string format: uuid
entity_type
required

Type of involved resource.

string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE WORK_GROUP MATERIAL MATERIAL_ITEM ACTION
description

Description of the resource’s involvement.

string
nullable
tenant_id
required

The project (company). Pass the project_id.

string format: uuid
subtenant_id
required

The office. Pass the office_id.

string format: uuid
GET
/v2/incident-resource/view/{id}

Retrieves a single involved resource by its ID.

id
required
string format: uuid

The office_incident_resource_id to retrieve.

Involved resource found

object
office_incident_resource_id
string format: uuid
office_incident_id
string format: uuid
entity_id
string format: uuid
entity_type
string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE WORK_GROUP MATERIAL MATERIAL_ITEM ACTION
description
string
tenant_id
string format: uuid
subtenant_id
string format: uuid
entity_name

Name of the involved resource.

string
entity_code

Code of the involved resource.

string
nullable
incident_code
string
nullable
incident_name
string
incident_date
string format: date
incident_category
string
incident_status
string
Allowed values: new open closed
project_name
string
project_type
string
Allowed values: safety template
office_name
string

Not found

PUT
/v2/incident-resource/update/{id}

Updates an existing involved resource record.

id
required
string format: uuid

The office_incident_resource_id to update.

Fields to update

object
office_incident_resource_id

Unique identifier. Auto-generated if not provided.

string format: uuid
office_incident_id
required

The incident. Pass the office_incident_id from the Incident API.

string format: uuid
entity_id
required

The involved resource. 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
  • WORK_GROUP: pass the work_group_id
  • MATERIAL: pass the material_id
  • MATERIAL_ITEM: pass the material_item_id
  • ACTION: pass the action_id
string format: uuid
entity_type
required

Type of involved resource.

string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE WORK_GROUP MATERIAL MATERIAL_ITEM ACTION
description

Description of the resource’s involvement.

string
nullable
tenant_id
required

The project (company). Pass the project_id.

string format: uuid
subtenant_id
required

The office. Pass the office_id.

string format: uuid

Updated successfully

object
office_incident_resource_id

Unique identifier. Auto-generated if not provided.

string format: uuid
office_incident_id
required

The incident. Pass the office_incident_id from the Incident API.

string format: uuid
entity_id
required

The involved resource. 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
  • WORK_GROUP: pass the work_group_id
  • MATERIAL: pass the material_id
  • MATERIAL_ITEM: pass the material_item_id
  • ACTION: pass the action_id
string format: uuid
entity_type
required

Type of involved resource.

string
Allowed values: EQUIPMENT WORK_ENVIRONMENT SUBSTANCE WORK_GROUP MATERIAL MATERIAL_ITEM ACTION
description

Description of the resource’s involvement.

string
nullable
tenant_id
required

The project (company). Pass the project_id.

string format: uuid
subtenant_id
required

The office. Pass the office_id.

string format: uuid

Not found

DELETE
/v2/incident-resource/delete/{id}

Deletes an involved resource record.

id
required
string format: uuid

The office_incident_resource_id to delete.

force
boolean

If true, deletes the record.

Deleted successfully

Preview of affected entities (returned when force=false)