Skip to main content
GET
/
api
/
v1
/
reviews
/
{review_id}
Get Review Details
curl --request GET \
  --url https://api.example.com/api/v1/reviews/{review_id}
{
  "id": 123,
  "event_type": "<string>",
  "source": "<string>",
  "status": "<string>",
  "pr_status": "<string>",
  "created_at": {},
  "processed_at": {},
  "pr_title": "<string>",
  "pr_number": 123,
  "repo_name": "<string>",
  "branch": "<string>",
  "author": "<string>",
  "pr_url": "<string>",
  "ai_summary": "<string>",
  "files_analyzed": 123
}

Overview

Fetch complete details for a single PR review by its event ID, including the full AI-generated summary and all analyzed files.

Authentication

Requires a valid JWT token in the Authorization header:
Authorization: Bearer YOUR_JWT_TOKEN

Path Parameters

review_id
integer
required
The unique event ID of the review

Response

Returns a single review object with full details.
id
integer
Event ID
event_type
string
Type of event (e.g., “pull_request”)
source
string
Event source (e.g., “github”)
status
string
Processing status: pending, processing, completed, or failed
pr_status
string
Current PR status: open, merged, or closed
created_at
datetime
Timestamp when the event was created
processed_at
datetime
Timestamp when the event was processed (null if pending)
pr_title
string
Pull request title
pr_number
integer
Pull request number
repo_name
string
Repository full name (owner/repo)
branch
string
Source branch name
author
string
GitHub username of the PR author
pr_url
string
Direct URL to the pull request on GitHub
ai_summary
string
Complete AI-generated review summary including verdict, confidence score, and detailed findings
files_analyzed
integer
Total number of files analyzed by the AI reviewer

Example Request

curl -X GET "https://api.nectr.ai/api/v1/reviews/1234" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "id": 1234,
  "event_type": "pull_request",
  "source": "github",
  "status": "completed",
  "pr_status": "open",
  "created_at": "2026-03-10T14:30:00Z",
  "processed_at": "2026-03-10T14:32:15Z",
  "pr_title": "Add user authentication endpoints",
  "pr_number": 42,
  "repo_name": "acme/api-server",
  "branch": "feature/auth",
  "author": "johndoe",
  "pr_url": "https://github.com/acme/api-server/pull/42",
  "ai_summary": "APPROVE\n\nConfidence: 4/5\n\nThis PR implements secure user authentication endpoints with JWT token generation and validation. The implementation follows security best practices and includes comprehensive error handling.\n\n🟢 **Minor Suggestion**: Consider rate-limiting authentication attempts\n\n### Security\n- Password hashing uses bcrypt with appropriate cost factor\n- JWT tokens include expiration and refresh mechanism\n- Input validation prevents injection attacks\n\n### Code Quality\n- Clean separation of concerns\n- Comprehensive unit tests included\n- API documentation is thorough\n\n### Recommendation\nThis PR is ready to merge. The authentication implementation is solid and follows industry standards.",
  "files_analyzed": 8
}

Error Responses

Review Not Found

{
  "detail": "Review not found"
}
HTTP Status: 404 Not Found

Unauthorized

{
  "detail": "Not authenticated"
}
HTTP Status: 401 Unauthorized

AI Summary Format

The ai_summary field contains a structured review with the following elements:
  1. Verdict: One of APPROVE, REQUEST_CHANGES, or NEEDS_DISCUSSION
  2. Confidence Score: Rated from 1/5 to 5/5
  3. Categorized Issues: Grouped by severity with emoji indicators:
    • 🔴 Critical: Security vulnerabilities, breaking changes, data loss risks
    • 🟡 Moderate: Performance issues, code quality concerns, missing tests
    • 🟢 Minor: Style suggestions, documentation improvements, refactoring opportunities
  4. Detailed Analysis: Context-aware insights based on the codebase and PR changes
  5. Recommendation: Final verdict on whether the PR should be merged

Use Cases

Display Full Review in UI

review = get_review(review_id)

if review['status'] == 'completed':
    print(f"PR #{review['pr_number']}: {review['pr_title']}")
    print(f"Files analyzed: {review['files_analyzed']}")
    print("\nAI Review:")
    print(review['ai_summary'])
else:
    print(f"Review status: {review['status']}")

Extract Verdict and Confidence

import re

review = get_review(review_id)
summary = review['ai_summary']

# Extract verdict
if 'APPROVE' in summary:
    verdict = 'APPROVE'
elif 'REQUEST_CHANGES' in summary:
    verdict = 'REQUEST_CHANGES'
elif 'NEEDS_DISCUSSION' in summary:
    verdict = 'NEEDS_DISCUSSION'

# Extract confidence score
match = re.search(r'Confidence: (\d)/5', summary)
confidence = int(match.group(1)) if match else None

print(f"Verdict: {verdict} (Confidence: {confidence}/5)")

Build docs developers (and LLMs) love