## GET /v1/reviews/{id}

Read a code review with its reviewers and every comment they returned, including the ones held back for anchoring outside the reviewed range.

Required permissions: read:reviews.
API key: Supported.
CLI user token: Supported.
Session token: Requires the ellipsis:api scope, and the session's permissions.ellipsis rules must allow the operation.
Higher permission levels include lower levels: read < write < delete.

### Response

```text
{
  "base_sha": str,
  "blocking": int,
  "budget": int,
  "comments": [
    {
      "blocking": bool,
      "body": str,
      "id": str,
      "line": int,
      "path": str,
      "reviewer": str,
      "side": str,
      "start_line": int,
      "start_side": str,
      "status": str
    }
  ],
  "config": {
    "id": str,
    "name": str
  },
  "cost": {
    "charged": int,
    "cpu": int,
    "fee": int,
    "llm": {
      "all": {
        "claude_subscription": int,
        "codex_subscription": int,
        "platform": int,
        "total": int
      },
      "by_model": [
        {
          "claude_subscription": int,
          "codex_subscription": int,
          "model": str,
          "platform": int,
          "total": int
        }
      ]
    },
    "memory": int,
    "total": int
  },
  "created_at": str,
  "error": str,
  "event": str,
  "finalized_at": str,
  "github_review_id": int,
  "head_sha": str,
  "id": str,
  "non_blocking": int,
  "pull_request": {
    "additions": int,
    "author": {
      "avatar_url": str,
      "id": int,
      "login": str,
      "name": str,
      "type": str
    },
    "base": {
      "ref": str,
      "sha": str
    },
    "changed_files": int,
    "commits": int,
    "created_at": str,
    "deletions": int,
    "head": {
      "ref": str,
      "sha": str
    },
    "id": int,
    "merged_at": str,
    "number": int,
    "repository": {
      "id": int,
      "name": str,
      "owner": str
    },
    "status": str,
    "title": str,
    "updated_at": str,
    "url": str
  },
  "repository": {
    "id": int,
    "name": str,
    "owner": str
  },
  "reviewers": [
    {
      "error": str,
      "finished_at": str,
      "name": str,
      "range_base_sha": str,
      "reviewed_files": int,
      "reviewed_lines": int,
      "session_id": str,
      "status": str,
      "summary": str
    }
  ],
  "status": str,
  "tokens": {
    "all": {
      "cache_creation": int,
      "cache_read": int,
      "input": int,
      "output": int,
      "total": int
    },
    "by_model": [
      {
        "cache_creation": int,
        "cache_read": int,
        "input": int,
        "model": str,
        "output": int,
        "total": int
      }
    ]
  },
  "url": str
}
```

### Python

```python
import os

from ellipsis import Ellipsis

client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])

result = client.reviews.get("...")
print(result)
```

### TypeScript

```typescript
import { Ellipsis } from '@ellipsis-dev/sdk';

const client = new Ellipsis({
  apiKey: process.env.ELLIPSIS_API_TOKEN!,
});

const result = await client.reviews.get('...');
console.log(result);
```

### cURL

```bash
curl "https://api.ellipsis.dev/v1/reviews/{id}" \
  -H "Authorization: Bearer $ELLIPSIS_API_TOKEN"
```

### Response schema

```json
{
  "properties": {
    "base_sha": {
      "type": "string"
    },
    "blocking": {
      "type": "integer"
    },
    "budget": {
      "type": "integer"
    },
    "comments": {
      "items": {
        "properties": {
          "blocking": {
            "type": "boolean"
          },
          "body": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "line": {
            "type": "integer"
          },
          "path": {
            "type": "string"
          },
          "reviewer": {
            "type": "string"
          },
          "side": {
            "type": "string"
          },
          "start_line": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "start_side": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "eligible",
              "posted",
              "outside_range",
              "not_in_diff"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "reviewer",
          "path",
          "line",
          "side",
          "body",
          "blocking",
          "status"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "config": {
      "anyOf": [
        {
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "cost": {
      "properties": {
        "charged": {
          "default": 0,
          "type": "integer"
        },
        "cpu": {
          "default": 0,
          "type": "integer"
        },
        "fee": {
          "default": 0,
          "type": "integer"
        },
        "llm": {
          "properties": {
            "all": {
              "properties": {
                "claude_subscription": {
                  "default": 0,
                  "type": "integer"
                },
                "codex_subscription": {
                  "default": 0,
                  "type": "integer"
                },
                "platform": {
                  "default": 0,
                  "type": "integer"
                },
                "total": {
                  "default": 0,
                  "type": "integer"
                }
              },
              "required": [
                "claude_subscription",
                "codex_subscription",
                "platform",
                "total"
              ],
              "type": "object"
            },
            "by_model": {
              "items": {
                "properties": {
                  "claude_subscription": {
                    "default": 0,
                    "type": "integer"
                  },
                  "codex_subscription": {
                    "default": 0,
                    "type": "integer"
                  },
                  "model": {
                    "type": "string"
                  },
                  "platform": {
                    "default": 0,
                    "type": "integer"
                  },
                  "total": {
                    "default": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "claude_subscription",
                  "codex_subscription",
                  "model",
                  "platform",
                  "total"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "all",
            "by_model"
          ],
          "type": "object"
        },
        "memory": {
          "default": 0,
          "type": "integer"
        },
        "total": {
          "default": 0,
          "type": "integer"
        }
      },
      "required": [
        "charged",
        "cpu",
        "fee",
        "llm",
        "memory",
        "total"
      ],
      "type": "object"
    },
    "created_at": {
      "format": "date-time",
      "type": "string"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "event": {
      "anyOf": [
        {
          "enum": [
            "COMMENT",
            "APPROVE",
            "REQUEST_CHANGES"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "finalized_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "github_review_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "head_sha": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "non_blocking": {
      "type": "integer"
    },
    "pull_request": {
      "anyOf": [
        {
          "properties": {
            "additions": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "author": {
              "properties": {
                "avatar_url": {
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                },
                "login": {
                  "type": "string"
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": {
                  "enum": [
                    "User",
                    "Organization",
                    "Bot",
                    "Mannequin"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "avatar_url",
                "id",
                "login",
                "name",
                "type"
              ],
              "type": "object"
            },
            "base": {
              "properties": {
                "ref": {
                  "type": "string"
                },
                "sha": {
                  "type": "string"
                }
              },
              "required": [
                "ref",
                "sha"
              ],
              "type": "object"
            },
            "changed_files": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "commits": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "format": "date-time",
              "type": "string"
            },
            "deletions": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "head": {
              "properties": {
                "ref": {
                  "type": "string"
                },
                "sha": {
                  "type": "string"
                }
              },
              "required": [
                "ref",
                "sha"
              ],
              "type": "object"
            },
            "id": {
              "type": "integer"
            },
            "merged_at": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "number": {
              "type": "integer"
            },
            "repository": {
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "owner": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "owner"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "open",
                "draft",
                "merged",
                "closed"
              ],
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "updated_at": {
              "format": "date-time",
              "type": "string"
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "additions",
            "author",
            "base",
            "changed_files",
            "commits",
            "created_at",
            "deletions",
            "head",
            "id",
            "merged_at",
            "number",
            "repository",
            "status",
            "title",
            "updated_at",
            "url"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "repository": {
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "owner"
      ],
      "type": "object"
    },
    "reviewers": {
      "items": {
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "range_base_sha": {
            "type": "string"
          },
          "reviewed_files": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewed_lines": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "session_id": {
            "type": "string"
          },
          "status": {
            "enum": [
              "running",
              "completed",
              "failed"
            ],
            "type": "string"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "session_id",
          "range_base_sha",
          "status"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "status": {
      "enum": [
        "running",
        "posting",
        "posted",
        "empty",
        "failed"
      ],
      "type": "string"
    },
    "tokens": {
      "properties": {
        "all": {
          "properties": {
            "cache_creation": {
              "default": 0,
              "type": "integer"
            },
            "cache_read": {
              "default": 0,
              "type": "integer"
            },
            "input": {
              "default": 0,
              "type": "integer"
            },
            "output": {
              "default": 0,
              "type": "integer"
            },
            "total": {
              "default": 0,
              "type": "integer"
            }
          },
          "required": [
            "cache_creation",
            "cache_read",
            "input",
            "output",
            "total"
          ],
          "type": "object"
        },
        "by_model": {
          "items": {
            "properties": {
              "cache_creation": {
                "default": 0,
                "type": "integer"
              },
              "cache_read": {
                "default": 0,
                "type": "integer"
              },
              "input": {
                "default": 0,
                "type": "integer"
              },
              "model": {
                "type": "string"
              },
              "output": {
                "default": 0,
                "type": "integer"
              },
              "total": {
                "default": 0,
                "type": "integer"
              }
            },
            "required": [
              "cache_creation",
              "cache_read",
              "input",
              "model",
              "output",
              "total"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "all",
        "by_model"
      ],
      "type": "object"
    },
    "url": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "url",
    "repository",
    "pull_request",
    "base_sha",
    "head_sha",
    "status",
    "blocking",
    "non_blocking",
    "created_at",
    "config",
    "reviewers",
    "comments",
    "cost",
    "budget",
    "tokens"
  ],
  "type": "object"
}
```
