API reference · v1
List open pull requests
Choose an open pull request in the authorised repository. A provider failure returns an error.
Authorization
apiSession Owner credential for a single workspace. Expires after seven days or on revocation.
In: header
Path Parameters
Okae workspace ID from this session.
uuidOkae repository UUID returned as repository.id, or as id on a repository list item.
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/repositories/497f6eca-6276-4993-bfeb-53cbbbba6f08/pull-requests"{ "pull_requests": [ { "number": 42, "title": "Add inventory search", "url": "https://github.com/example/inventory/pull/42", "head_sha": "b10aee0f983af246eb1fc96a76d32dae14289e52", "base_branch": "main" } ], "first_assessment": { "assessment": null }}Run a preflight on changes POST
Apply the repository's rule checks to change metadata before you open a pull request. Send paths, renames, line counts and Git modes only, never file contents. The default-branch okae.yml and managed settings supply the policy. A preflight is free: it creates no assessment and uses no credits. A clean result doesn't predict approval, because the full assessment also reviews the diff.
Request an assessment POST
Queue an assessment of the open PR. Okae verifies the repository and pins the current GitHub head revision at submission. The response includes that SHA and the job_id to poll. If supplied, head_sha must match the current head. An active run returns a conflict.