> For the complete documentation index, see [llms.txt](https://docs.statusentry.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.statusentry.com/incident-api.md).

# Incident API

## List Incidents

<mark style="color:blue;">`GET`</mark> `https://api.statusentry.com/v1/incidents`

This endpoint allows you to get your incidents.

#### Headers

| Name          | Type   | Description         |
| ------------- | ------ | ------------------- |
| Authorization | string | Authorization token |

{% tabs %}
{% tab title="200 " %}

```
{
    "customerId": "87da60eb-d7ab-4f10-9151-7df1c09c030e",
    "incidents": [
        {
            "customerId": "87da60eb-d7ab-4f10-9151-7df1c09c030e",
            "id": "bf0c3fca-6eb7-4046-b257-833138a0be3e",
            "name": "Test incident",
            "incidentStatus": "resolved",
            "incidentImpact": "none",
            "creationTime": "1609443863653",
            "resolutionTime": "1609444055138"
        },
        {
            "customerId": "87da60eb-d7ab-4f10-9151-7df1c09c030e",
            "id": "5996776d-21d1-4d72-92be-7517a355ca96",
            "name": "Signup page is having intermittent errors.",
            "incidentStatus": "investigating",
            "incidentImpact": "minor",
            "creationTime": "1609444309698"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get Incident

<mark style="color:blue;">`GET`</mark> `https://api.statusentry.com/v1/incidents/:id`

This endpoint allows you to retrieve specific incident.

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | string | Incident ID |

#### Headers

| Name          | Type   | Description         |
| ------------- | ------ | ------------------- |
| Authorization | string | Authorization Token |

{% tabs %}
{% tab title="200 " %}

```
{
    "customerId": "87da60eb-d7ab-4f10-9151-7df1c09c030e",
    "id": "5996776d-21d1-4d72-92be-7517a355ca96",
    "name": "C",
    "incidentStatus": "investigating",
    "incidentImpact": "minor",
    "creationTime": "1609444309698"
}
```

{% endtab %}
{% endtabs %}

## Create Incident

<mark style="color:green;">`POST`</mark> `https://api.statusentry.com/v1/incidents`

This endpoint allows you to create new incident.

#### Headers

| Name          | Type   | Description         |
| ------------- | ------ | ------------------- |
| Authorization | string | Authorization Token |

#### Request Body

| Name           | Type   | Description                                                                                                                        |
| -------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| entry          | object | Incident details                                                                                                                   |
| incidentImpact | string | <p>Impact of the incident. Default value: "none"<br>Possible values:<br>"none",<br>"minor",<br>"major",<br>"critical"</p>          |
| incidentStatus | string | <p>Current status of the incident.<br>Possible values: <br>"investigating", <br>"identified", <br>"monitoring", <br>"resolved"</p> |
| name           | string | Incident message                                                                                                                   |

{% tabs %}
{% tab title="200 " %}

```
{
    "customerId": "87da60eb-d7ab-4f10-9151-7df1c09c030e",
    "id": "a2e22f11-8955-4873-96f3-0f943b325943",
    "name": "Signup page is having intermittent errors.",
    "incidentStatus": "investigating",
    "incidentImpact": "minor",
    "creationTime": "1609681547"
}
```

{% endtab %}
{% endtabs %}

An incident entry request object takes following parameters:

```
"entry":
{
    "message": "We are investigating a problem in our signup flow. We will provide an update as soon as we have more information or within 10 minutes.",
    "date": "1609681547", // epoch time in millis
    "incidentStatus": "investigating",
    "affectedComponents": [ // Optional
        {
        "componentId": "fb5e3cdc-4550-47d9-a96d-287c987f2ba02",
        "componentStatus": "degraded_performance"
    }
    ],
    "sendNotification": true // Optional, default true
}
```

## Delete Incident

<mark style="color:red;">`DELETE`</mark> `https://api.statusentry.com/v1/incidents/:id`

This endpoint allows you to delete an incident.

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | string | Incident ID |

#### Headers

| Name          | Type   | Description         |
| ------------- | ------ | ------------------- |
| Authorization | string | Authorization Token |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}
