# Everything needed to review a pull request.

> Reads GitHub now: changed files, commits and GitHub's checks, beside Koidog's own evidence from the run that produced the branch.
> https://koi.dog/docs/api/pull-requests/get-pull-request-review/

`GET /api/v1/pull-requests/{id}/review` · Scope: `read`

A part GitHub did not answer is `available: false` with the reason, never a guess. Experimental: this route may change inside v1. No query parameters.

## Path parameters.

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

## Response.

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

## Request.

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

```js
const res = await fetch(`https://app.koi.dog/api/v1/pull-requests/${process.env.ID}/review`, {
  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/pull-requests/{os.environ['ID']}/review",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "pr": {
    "id": "string",
    "url": "string",
    "repo": "string",
    "number": 0,
    "state": "unknown",
    "draft": false,
    …
  },
  "project": {
    "id": "string",
    "name": "string"
  },
  "crew": {
  },
  "task": {
  },
  "files": {
  },
  "commits": {
  },
  "evidence": {
  },
  "githubChecks": {
  },
  "readAt": "string",
  …
}
```
