# The task branch against the project's default branch.

> https://koi.dog/docs/api/tasks/get-task-diff/

`GET /api/v1/tasks/{id}/diff` · Scope: `read`

Experimental: this route may change inside v1. No query parameters.

## Path parameters.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | The task's id. |

## Response.

200 OK: a JSON object. The example has placeholder values.

## Request.

```sh
curl "https://app.koi.dog/api/v1/tasks/$ID/diff" \
    -H "Authorization: Bearer $KOIDOG_API_KEY"
```

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

```python
import os

import requests

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

## Response example.

```json
{
  "base": "string",
  "head": "string",
  "files": [],
  "truncated": false
}
```
