---
title: "IncidentAction"
url: "https://dev.4hse.com/api/incidentaction"
---

# IncidentAction

An **IncidentAction** links an incident to a corrective or preventive action. It indicates that an action has been taken or must be taken in response to the incident.

Use this API to:

-   Link corrective/preventive actions to an incident
-   Find all actions linked to an incident (filter by `office_incident_id`)
-   Find all incidents linked to an action (filter by `entity_id`)

Version

2.0.0

OpenAPI version

3.0.0

## Authentication

[Section titled “ Authentication ”](#authentication)

### OAuth2

[Section titled “OAuth2 ”](#oauth2)

**Security scheme type:** oauth2

**Flow type:** password

**Token URL:** [https://auth.4hse.com/realms/4hse/protocol/openid-connect/token](https://auth.4hse.com/realms/4hse/protocol/openid-connect/token)

### AccessToken

[Section titled “AccessToken ”](#accesstoken)

**Security scheme type:** apiKey

**Query parameter name:** access-token

## Operations

[Section titled “Operations”](#operations)

### index

[Section titled “index”](#operation-indexIncidentAction-post)

POST

/v2/incident-action/index

-   

Returns a paginated list of incident-action links.

Most useful filters:

-   `office_incident_id`: all actions linked to a specific incident
-   `entity_id` (action\_id): all incidents linked to a specific action
-   `action_type`: filter by action type

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/incidentaction/#oauth2)**
-   **[AccessToken](/api/incidentaction/#accesstoken)**

#### Request Body

[Section titled “Request Body ”](#request-body)

Parameters for searching

Select media typeapplication/json

object

**filter**

object

**office\_incident\_action\_id**

string format: uuid

**office\_incident\_id**

string format: uuid

**entity\_type**

string

**entity\_id**

string format: uuid

**description**

string

**subtenant\_id**

string format: uuid

**tenant\_id**

string format: uuid

**action\_code**

Code of the linked action.

string

**action\_name**

Name of the linked action.

string

**action\_type**

Type of the linked action.

string

Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER

**incident\_code**

string

**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: action\_code action\_name action\_type incident\_name incident\_date office\_name

##### Example

```
{  "filter": {    "office_incident_id": "5c6d7e8f-9012-3456-abcd-ef5678901234"  },  "per-page": 20,  "page": 1,  "sort": "action_name"}
```

#### Responses

[Section titled “ Responses ”](#responses)

##### 200

[Section titled “200 ”](#200)

List of incident-action links

Select media typeapplication/json

Array<object>

object

**office\_incident\_action\_id**

string format: uuid

**office\_incident\_id**

string format: uuid

**entity\_type**

string

**entity\_id**

string format: uuid

**description**

string

**subtenant\_id**

string format: uuid

**tenant\_id**

string format: uuid

**action\_code**

Code of the linked action.

string

**action\_name**

Name of the linked action.

string

**action\_type**

Type of the linked action.

string

Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER

**incident\_code**

string

**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

#### Headers

[Section titled “Headers ”](#headers)

**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

### create

[Section titled “create”](#operation-createIncidentAction-post)

POST

/v2/incident-action/create

-   

Links a corrective/preventive action to an incident.

Requires `office_incident_id`, `entity_id` (the action\_id), `entity_type` (always `ACTION`), `subtenant_id` (office\_id), and `tenant_id` (project\_id). The `office_incident_action_id` is auto-generated if not provided.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/incidentaction/#oauth2)**
-   **[AccessToken](/api/incidentaction/#accesstoken)**

#### Request Body required

[Section titled “Request Body required ”](#request-body)

Incident-action link to create

Select media typeapplication/json

object

**office\_incident\_action\_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

<= 50 characters

**entity\_type**

required

Always `ACTION`.

string

<= 50 characters

**entity\_id**

required

The corrective/preventive action. Pass the `action_id` from the Action API.

string format: uuid

<= 50 characters

**description**

Optional description of why this action was linked (e.g. corrective action rationale).

string

nullable

**subtenant\_id**

required

The office. Pass the `office_id`.

string format: uuid

<= 50 characters

**tenant\_id**

required

The project (company). Pass the `project_id`.

string format: uuid

<= 50 characters

#### Responses

[Section titled “ Responses ”](#responses)

##### 201

[Section titled “201 ”](#201)

Action linked to incident successfully

Select media typeapplication/json

object

**office\_incident\_action\_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

<= 50 characters

**entity\_type**

required

Always `ACTION`.

string

<= 50 characters

**entity\_id**

required

The corrective/preventive action. Pass the `action_id` from the Action API.

string format: uuid

<= 50 characters

**description**

Optional description of why this action was linked (e.g. corrective action rationale).

string

nullable

**subtenant\_id**

required

The office. Pass the `office_id`.

string format: uuid

<= 50 characters

**tenant\_id**

required

The project (company). Pass the `project_id`.

string format: uuid

<= 50 characters

### view

[Section titled “view”](#operation-viewIncidentAction-get)

GET

/v2/incident-action/view/{id}

-   

Retrieves a single incident-action link by its ID.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/incidentaction/#oauth2)**
-   **[AccessToken](/api/incidentaction/#accesstoken)**

#### Path Parameters

[Section titled “Path Parameters ”](#path-parameters)

**id**

required

string format: uuid

The office\_incident\_action\_id to retrieve.

#### Responses

[Section titled “ Responses ”](#responses)

##### 200

[Section titled “200 ”](#200)

Incident-action link found

Select media typeapplication/json

object

**office\_incident\_action\_id**

string format: uuid

**office\_incident\_id**

string format: uuid

**entity\_type**

string

**entity\_id**

string format: uuid

**description**

string

**subtenant\_id**

string format: uuid

**tenant\_id**

string format: uuid

**action\_code**

Code of the linked action.

string

**action\_name**

Name of the linked action.

string

**action\_type**

Type of the linked action.

string

Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER

**incident\_code**

string

**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

##### 404

[Section titled “404 ”](#404)

Not found

### update

[Section titled “update”](#operation-updateIncidentAction-put)

PUT

/v2/incident-action/update/{id}

-   

Updates an existing incident-action link.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/incidentaction/#oauth2)**
-   **[AccessToken](/api/incidentaction/#accesstoken)**

#### Path Parameters

[Section titled “Path Parameters ”](#path-parameters)

**id**

required

string format: uuid

The office\_incident\_action\_id to update.

#### Request Body required

[Section titled “Request Body required ”](#request-body)

Fields to update

Select media typeapplication/json

object

**office\_incident\_action\_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

<= 50 characters

**entity\_type**

required

Always `ACTION`.

string

<= 50 characters

**entity\_id**

required

The corrective/preventive action. Pass the `action_id` from the Action API.

string format: uuid

<= 50 characters

**description**

Optional description of why this action was linked (e.g. corrective action rationale).

string

nullable

**subtenant\_id**

required

The office. Pass the `office_id`.

string format: uuid

<= 50 characters

**tenant\_id**

required

The project (company). Pass the `project_id`.

string format: uuid

<= 50 characters

#### Responses

[Section titled “ Responses ”](#responses)

##### 200

[Section titled “200 ”](#200)

Updated successfully

Select media typeapplication/json

object

**office\_incident\_action\_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

<= 50 characters

**entity\_type**

required

Always `ACTION`.

string

<= 50 characters

**entity\_id**

required

The corrective/preventive action. Pass the `action_id` from the Action API.

string format: uuid

<= 50 characters

**description**

Optional description of why this action was linked (e.g. corrective action rationale).

string

nullable

**subtenant\_id**

required

The office. Pass the `office_id`.

string format: uuid

<= 50 characters

**tenant\_id**

required

The project (company). Pass the `project_id`.

string format: uuid

<= 50 characters

##### 404

[Section titled “404 ”](#404)

Not found

### delete

[Section titled “delete”](#operation-deleteIncidentAction-delete)

DELETE

/v2/incident-action/delete/{id}

-   

Deletes an incident-action link.

## Authorizations

[Section titled “Authorizations ”](#authorizations)

-   **[OAuth2](/api/incidentaction/#oauth2)**
-   **[AccessToken](/api/incidentaction/#accesstoken)**

#### Path Parameters

[Section titled “Path Parameters ”](#path-parameters)

**id**

required

string format: uuid

The office\_incident\_action\_id to delete.

#### Query Parameters

[Section titled “Query Parameters ”](#query-parameters)

**force**

boolean

If true, deletes the link.

#### Responses

[Section titled “ Responses ”](#responses)

##### 204

[Section titled “204 ”](#204)

Deleted successfully

##### 400

[Section titled “400 ”](#400)

Preview of affected entities (returned when force=false)

This site is protected by reCAPTCHA and the Google [Privacy Policy](https://policies.google.com/privacy) and [Terms of Service](https://policies.google.com/terms) apply.