API reference · v1
Apply a configuration change
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.
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
application/json
curl -X PUT "https://example.com/api/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/repositories/497f6eca-6276-4993-bfeb-53cbbbba6f08/settings" \ -H "Content-Type: application/json" \ -d '{ "expected_revision": 7, "updates": { "enabled_rules": { "lockfiles": false } }, "removals": [] }'{ "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9", "repository": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "full_name": "string" }, "context": { "branch": "string", "commit_sha": "string", "file": { "path": "string", "status": "present", "blob_sha": "string", "url": "http://example.com" } }, "configuration": { "status": "valid", "errors": [ { "code": "string", "message": "string", "path": "string" } ] }, "fields": [ { "key": "enable_approvals", "value": "string", "source": "service_default", "default": "string", "constraints": { "type": "boolean", "minimum": 0, "maximum": 0, "enum": [ "string" ], "labels": { "property1": "string", "property2": "string" }, "items": { "type": "string" }, "mandatory": [ "string" ], "read_only": true } } ], "review_setting": "most_cautious", "approval": { "available": true, "blockers": [ { "code": "string", "message": "string", "path": "string" } ] }, "warnings": [ { "code": "string", "message": "string", "path": "string" } ], "storage": { "repository": { "status": "available", "revision": 1, "overrides": { "enable_approvals": true, "assess_drafts": true, "assess_forks": true, "strictness": "most_cautious", "protected_paths": [ "string" ], "ignored_paths": [ "string" ], "max_changed_lines": 1, "max_files": 1, "enabled_rules": { "deleted_files": true, "renamed_files": true, "ci_configuration": true, "dependency_manifests": true, "lockfiles": true, "licence_files": true, "code_ownership": true, "infrastructure": true, "api_schemas": true, "database_migrations": true, "binary_files": true, "executable_permissions": true, "symlinks": true, "submodules": true, "agent_instructions": true, "hidden_characters": true, "auto_run_config": true }, "signals": { "consumer_compatibility": "most_cautious", "data_access": "most_cautious", "permissions": "most_cautious", "production": "most_cautious", "dependencies": "most_cautious", "hard_to_revert": "most_cautious", "entry_point": "most_cautious", "weakens_verification": "most_cautious", "memory_safety": "most_cautious", "injection": "most_cautious", "unsafe_deserialization": "most_cautious", "security_controls": "most_cautious" } } } }}Preview okae.yml POST
Compare the current default-branch policy with the supplied okae.yml and existing managed overrides. Send null to preview deleting the file. The base commit identifies the configuration being compared. The proposed file has no published URL or blob SHA. Errors describe invalid settings. Previewing does not change the repository or workspace.
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.