# What was deleted, when, by whom and what went with it.

> Every crew, project and artifact deleted by a request or by retention, newest first.
> https://koi.dog/docs/api/costs-and-settings/list-deletions/

`GET /api/v1/deletions` · Scope: `read`

## Query parameters.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | `array` | no | One or more values, comma-separated. For events: exact kinds or prefixes such as `run.*`. Any of `crew`, `project`, `artifact`. At least 1 item. |
| `projectId` | `string` | no | Filter by project. At least 1 character. |
| `crewId` | `string` | no | Filter by crew. At least 1 character. |
| `limit` | `1–200` | no | Page size. Default `50`. |
| `cursor` | `string` | no | Previous page’s `nextCursor`. Keep filters and order. At least 1 character. |
| `order` | `enum` | no | Sort by creation time, then ID. `desc` newest, `asc` oldest. One of `asc`, `desc`. Default `desc`. |

## Response.

200 OK · `data`: `object[]`. Pass `nextCursor` as `cursor` when `hasMore` is true.

## Request.

```sh
curl https://api.koi.dog/api/v1/deletions \
    -H "Authorization: Bearer $KOIDOG_API_KEY"
```

```js
const res = await fetch("https://api.koi.dog/api/v1/deletions", {
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
  },
});
console.log(await res.json());
```

```python
import os

import requests

r = requests.get(
    "https://api.koi.dog/api/v1/deletions",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "data": [],
  "nextCursor": "string",
  "hasMore": false
}
```
