# Incident Data

The incidents of Ella PSAP as NENA Emergency Incident Data Objects (EIDOs), for dispatch systems and other agencies. These paths are under `/IncidentData`, not `/api/v1`, and their responses are not wrapped in `result`.

## Retrieve an Incident's EIDO

Returns the current state of an [incident](<https://docs.ellanetworks.com/psap/reference/api/incidents/index.md>) as an EIDO 1.0, the EIDO Retrieval Service of NENA-STA-024.1.1.

| Method | Path |
| --- | --- |
| GET | `/IncidentData/v1/incidents/{id}` |

`{id}` is the incident ID, URL-encoded.

### Request Headers

The headers the request may carry.

| Header | Description |
| --- | --- |
| `Accept` | `application/emergency.eido+json; version="<majors>"`, with the comma-separated EIDO major versions the client supports. Default: version 1. A request for no media type or version that Ella PSAP supports returns `406`. |

### Response

The body is the EIDO, with `Content-Type: application/emergency.eido+json; version="1"`.

| EIDO component | Holds |
| --- | --- |
| `agencyComponent` | The agency of [`agency_id`](<https://docs.ellanetworks.com/psap/reference/config_file/index.md>), with the role `CallReceiving` and the type `psap`. |
| `agentComponent` | Each call taker of the incident, with the role `Call Taking`. |
| `incidentComponent` | The [type](<https://docs.ellanetworks.com/psap/reference/incident_codes/index.md#incident-types>), the status `Active` or `Closed`, the emergency location, the notes and, once closed, the [disposition](<https://docs.ellanetworks.com/psap/reference/incident_codes/index.md#dispositions>). Absent until a type is set. |
| `callComponent` | Each call and callback, with its call identifier, direction, state, answer time, locations and caller. |
| `personComponent` | Each phone that called or texted, as a `Caller`. |
| `callbackComponent` | How to reach each caller: the URIs the network asserted for a call, or a `tel:` URI for a text, and the Contact header of the phone. |
| `locationComponent` | The emergency location (`CurrentIncident`), the locations sent with calls and the AML locations (`Caller`), each as a PIDF-LO. |
| `notesComponent` | Each note, with its author. |
| `mergeComponent` | The incidents merged into this one (`REPLACED`), or the incident this one was merged into (`REPLACING`). |

### Sample Request

```
GET /IncidentData/v1/incidents/urn%3Aemergency%3Auid%3Aincidentid%3A01M8Y7CAN3N9GYZWWWAD7QMJSE%3Apsap.example.org
Accept: application/emergency.eido+json; version="1"
Authorization: Bearer ellapsap_...
```

## Get the Versions

Returns the versions of the incident data service. It takes no token.

| Method | Path |
| --- | --- |
| GET | `/IncidentData/Versions` |

### Response Fields

| Field | Type | Description |
| --- | --- | --- |
| `fingerprint` | string | The Ella PSAP release. |
| `versions[].major` | integer | A supported major version. |
| `versions[].minor` | integer | Its minor version. |

### Sample Response

```
{
    "fingerprint": "ella-psap-v0.0.1",
    "versions": [{"major": 1, "minor": 0}]
}
```
