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
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/incident-resource/index
Returns a paginated list of resources involved in incidents.
Most useful filters:
office_incident_id: all resources involved in a specific incidententity_id: all incidents that involved a specific resourceentity_type: filter by resource type
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching
object
object
Name of the involved resource.
Code of the involved resource.
Example
{ "filter": { "office_incident_id": "5c6d7e8f-9012-3456-abcd-ef5678901234" }, "per-page": 20, "page": 1, "sort": "entity_name"}Responses
Section titled “ Responses ”List of involved resources
object
Name of the involved resource.
Code of the involved resource.
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/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 theoffice_equipment_idWORK_ENVIRONMENT: pass theoffice_work_environment_idSUBSTANCE: pass theoffice_substance_idWORK_GROUP: pass thework_group_idMATERIAL: pass thematerial_idMATERIAL_ITEM: pass thematerial_item_idACTION: pass theaction_id
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Involved resource to register
object
Unique identifier. Auto-generated if not provided.
The incident. Pass the office_incident_id from the Incident API.
The involved resource. What to pass depends on entity_type:
EQUIPMENT: pass theoffice_equipment_idWORK_ENVIRONMENT: pass theoffice_work_environment_idSUBSTANCE: pass theoffice_substance_idWORK_GROUP: pass thework_group_idMATERIAL: pass thematerial_idMATERIAL_ITEM: pass thematerial_item_idACTION: pass theaction_id
Type of involved resource.
Description of the resource’s involvement.
The project (company). Pass the project_id.
The office. Pass the office_id.
Responses
Section titled “ Responses ”Involved resource registered successfully
object
Unique identifier. Auto-generated if not provided.
The incident. Pass the office_incident_id from the Incident API.
The involved resource. What to pass depends on entity_type:
EQUIPMENT: pass theoffice_equipment_idWORK_ENVIRONMENT: pass theoffice_work_environment_idSUBSTANCE: pass theoffice_substance_idWORK_GROUP: pass thework_group_idMATERIAL: pass thematerial_idMATERIAL_ITEM: pass thematerial_item_idACTION: pass theaction_id
Type of involved resource.
Description of the resource’s involvement.
The project (company). Pass the project_id.
The office. Pass the office_id.
GET /v2/incident-resource/view/{id}
Retrieves a single involved resource by its ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The office_incident_resource_id to retrieve.
Responses
Section titled “ Responses ”Involved resource found
object
Name of the involved resource.
Code of the involved resource.
Not found
update
Section titled “update” PUT /v2/incident-resource/update/{id}
Updates an existing involved resource record.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The office_incident_resource_id to update.
Request Body required
Section titled “Request Body required ”Fields to update
object
Unique identifier. Auto-generated if not provided.
The incident. Pass the office_incident_id from the Incident API.
The involved resource. What to pass depends on entity_type:
EQUIPMENT: pass theoffice_equipment_idWORK_ENVIRONMENT: pass theoffice_work_environment_idSUBSTANCE: pass theoffice_substance_idWORK_GROUP: pass thework_group_idMATERIAL: pass thematerial_idMATERIAL_ITEM: pass thematerial_item_idACTION: pass theaction_id
Type of involved resource.
Description of the resource’s involvement.
The project (company). Pass the project_id.
The office. Pass the office_id.
Responses
Section titled “ Responses ”Updated successfully
object
Unique identifier. Auto-generated if not provided.
The incident. Pass the office_incident_id from the Incident API.
The involved resource. What to pass depends on entity_type:
EQUIPMENT: pass theoffice_equipment_idWORK_ENVIRONMENT: pass theoffice_work_environment_idSUBSTANCE: pass theoffice_substance_idWORK_GROUP: pass thework_group_idMATERIAL: pass thematerial_idMATERIAL_ITEM: pass thematerial_item_idACTION: pass theaction_id
Type of involved resource.
Description of the resource’s involvement.
The project (company). Pass the project_id.
The office. Pass the office_id.
Not found
delete
Section titled “delete” DELETE /v2/incident-resource/delete/{id}
Deletes an involved resource record.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The office_incident_resource_id to delete.
Query Parameters
Section titled “Query Parameters ”If true, deletes the record.
Responses
Section titled “ Responses ”Deleted successfully
Preview of affected entities (returned when force=false)