okaeDocs
APIExperimental

API reference · v1

Run a preflight on changes

POST
/api/v1/workspaces/{workspace_id}/repositories/{repository_id}/preflight

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
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

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

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      ]    }  ]}