okaeDocs
APIExperimental

API reference · v1

Request an assessment

POST
/api/v1/workspaces/{workspace_id}/repositories/{repository_id}/pull-requests/{number}/check

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.

Authorization

apiSession
AuthorizationBearer <token>

Owner credential for a single workspace. Expires after seven days or on revocation.

In: header

Path Parameters

workspace_id*string

Okae workspace ID from this session.

Formatuuid
repository_id*string

Okae repository UUID returned as repository.id, or as id on a repository list item.

Formatuuid
number*integer

PR number in this repository.

Range1 <= value

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/repositories/497f6eca-6276-4993-bfeb-53cbbbba6f08/pull-requests/1/check" \  -H "Content-Type: application/json" \  -d '{}'
{  "job_id": "64d5124c-2e89-4c78-8e18-5d461a48a048",  "pull_request": {    "number": 42,    "title": "Add inventory search",    "url": "https://github.com/example/inventory/pull/42",    "head_sha": "b10aee0f983af246eb1fc96a76d32dae14289e52",    "base_branch": "main"  }}