API reference · v1
Run a preflight on changes
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.
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.
uuidRequest 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
curl -X POST "https://example.com/api/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/repositories/497f6eca-6276-4993-bfeb-53cbbbba6f08/preflight" \ -H "Content-Type: application/json" \ -d '{ "files": [ { "path": "src/app.ts", "status": "modified", "additions": 12, "deletions": 3, "binary": false, "old_mode": "100644", "new_mode": "100644" } ] }'{ "repository": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "full_name": "string" }, "context": { "branch": "string", "commit_sha": "string" }, "decision": "review", "configuration_error": "string", "rules": [ "string" ], "checks": [ { "rule_id": "string", "state": "matched", "action": "review", "evidence": [ null ] } ]}Apply a configuration change PUT
Save only an owner-approved draft. A stale revision returns 409 settings_changed: read and preview again. If the response is lost, read the current revision and values before retrying. Saving settings does not start an assessment.
List open pull requests GET
Choose an open pull request in the authorised repository. A provider failure returns an error.