Incident
Questi contenuti non sono ancora disponibili nella tua lingua.
Manage incidents, including reporting, updating, deleting, and advanced search.
Incidents can be linked to offices, projects, and categories, and support metadata and filtering.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Operations
Sezione intitolata “Operations” POST /v2/incident/index
Returns a paginated and filterable list of incidents.
Use POST to allow complex filters via JSON payload.
Request Body
Sezione intitolata “Request Body ”Parameters for searching incidents
object
object
The field of the model to sort the list for, use a minus to revert the sort. Es -name is to require the sort in reverse order
The field establishes whether to also include historized elements that are no longer active in the results. If you leave this parameter empty the response returns only actual entries.
Example
{ "filter": { "name": "Incident 1", "category": "Injury" }, "per-page": 10, "page": 1, "sort": "name"}
Responses
Sezione intitolata “ Responses ”List of incidents
object
Example
{ "office_incident_id": "inc-1", "code": "INC-001", "name": "Incident 1", "date_incident": "2024-01-01", "category": "Injury", "description_event": "Minor injury occurred", "status": "open", "tenant_id": "ten-1", "subtenant_id": "sub-1"}
Headers
Sezione intitolata “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
POST /v2/incident/create
Create a new incident by providing the required details.
Request Body required
Sezione intitolata “Request Body required ”Incident object to be created
object
Example
{ "code": "INC-002", "name": "Incident 2", "date_incident": "2024-02-01", "category": "Fire", "description_event": "Small fire in warehouse", "status": "new", "tenant_id": "ten-1", "subtenant_id": "sub-1"}
Responses
Sezione intitolata “ Responses ”Incident created successfully
object
Example
{ "office_incident_id": "inc-2", "code": "INC-002", "name": "Incident 2", "date_incident": "2024-02-01", "category": "Fire", "description_event": "Small fire in warehouse", "status": "new", "tenant_id": "ten-1", "subtenant_id": "sub-1"}
GET /v2/incident/view/{id}
Retrieve an incident by its unique ID.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the incident to retrieve
Responses
Sezione intitolata “ Responses ”Incident found
object
Example
{ "office_incident_id": "inc-1", "code": "INC-001", "name": "Incident 1", "date_incident": "2024-01-01", "category": "Injury", "description_event": "Minor injury occurred", "status": "open", "tenant_id": "ten-1", "subtenant_id": "sub-1"}
Incident not found
DELETE /v2/incident/delete/{id}
Delete an incident by its unique ID.
If force=true, all related entities will also be deleted.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the incident to delete
Query Parameters
Sezione intitolata “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Sezione intitolata “ Responses ”Incident deleted successfully
If force=false, the operation is interrupted and the list of connected entities that will be deleted in case of confirmation (force=true) is returned
PUT /v2/incident/update/{id}
Update an existing incident by its unique ID.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the incident to update
Request Body required
Sezione intitolata “Request Body required ”Incident object with updated data
object
Example
{ "name": "Updated Incident", "category": "Near Miss"}
Responses
Sezione intitolata “ Responses ”Incident updated successfully
object
Example
{ "office_incident_id": "inc-1", "name": "Updated Incident", "category": "Near Miss"}
Incident not found