GET
/
v1
/
reviews
Get PRs
curl --request GET \
  --url https://api.ghostsecurity.ai/v1/reviews \
  --header 'Authorization: Bearer <token>'
{
  "has_more": true,
  "items": [
    {
      "closed_issue_count": 0,
      "created_at": "2025-01-01T00:00:00Z",
      "id": "csUT18jx0mY",
      "last_review_at": "2025-01-01T00:00:00Z",
      "open_high_count": 0,
      "open_issue_count": 0,
      "open_low_count": 0,
      "open_medium_count": 0,
      "pr_author": "author",
      "pr_number": 1,
      "pr_status": "open",
      "pr_title": "Fix bug",
      "provider": "github",
      "repo_id": "1e7d8c9b-ce80-41ae-8645-5b2a89165615-gitlab-69265683",
      "repo_name": "repo",
      "repo_owner": "owner",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "eyJzb3J0X3ZhbHVlIjoiMjAyNC0wMS0xNVQxMDozMDowMFoiLCJkb2N1bWVudF9pZCI6InJlcG8xMjMiLCJzb3J0X2ZpZWxkIjoiY3JlYXRlZF9hdCJ9",
  "total": 250
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

cursor
string

Pagination cursor

sort
enum<string>
default:updated_at

Sort field

Available options:
pr_title,
pr_number,
pr_status,
pr_author,
repo_name,
open_issue_count,
updated_at
order
enum<string>
default:desc

Sort order

Available options:
asc,
desc
size
integer
default:10

Page size

Required range: 1 <= x <= 1000
start_time
string

Filter by start time (RFC3339 format)

end_time
string

Filter by end time (RFC3339 format)

status
string

Filter by PR status (open, closed, merged)

custom
string

Filter by custom criteria (open_with_issues, merged_with_issues, not_reviewed, reviewed)

Response

OK

has_more
boolean

Indicates if there are more items available

Example:

true

items
object[]

The response items

next_cursor
string

Cursor for the next page

Example:

"eyJzb3J0X3ZhbHVlIjoiMjAyNC0wMS0xNVQxMDozMDowMFoiLCJkb2N1bWVudF9pZCI6InJlcG8xMjMiLCJzb3J0X2ZpZWxkIjoiY3JlYXRlZF9hdCJ9"

total
integer

Total count of items (if available)

Example:

250