Skip to main content

API reference

The controller exposes a REST API for programmatic access. The request bodies for resource endpoints use the custom resource shapes in the Resource reference, and the permissions each route needs are in API authorization.

Almost every /api/v1/* endpoint requires authentication. Kubernetes ServiceAccount tokens are the default; operators can also enable OIDC or context-token authentication. The header requirements for each mode are listed below.

Five routes are deliberately outside that middleware, because they authenticate a different way:

RouteHow it authenticates instead
GET /healthz, GET /readyzNot authenticated. Kubernetes probes them.
POST /api/v1/gateways/:namespace/:name/eventsThe Gateway's own inbound bearer Secret, not a user token.
POST /webhooks/githubHMAC over the request body (X-Hub-Signature-256).
GET /.well-known/orka/task-webhook-jwks.jsonNot authenticated. Publishes only the public keys that verify Task webhook signatures.
/internal/v2/acp/*Pool-scoped bearer credentials checked by the ACP handlers themselves. Not for client use.

Authentication​

Send Kubernetes ServiceAccount and OIDC credentials with the standard bearer token header:

Authorization: Bearer <token>

Authentication modes:

  • Kubernetes ServiceAccount token — default mode. Tokens are validated with the Kubernetes TokenReview API.
  • OIDC JWT — enabled when the controller is configured with --oidc-issuer and --oidc-audience (or ORKA_OIDC_ISSUER / ORKA_OIDC_AUDIENCE). Tokens are validated against the issuer, audience, expiration, RS256 signature, and --oidc-allowed-subjects; authorized OIDC callers are assigned --oidc-namespace for namespace isolation. If --oidc-jwks-url is omitted, Orka discovers the JWKS URL from the issuer metadata.
  • Context token / transaction-token TxToken — enabled with --context-token-profile=transaction-token, --context-token-issuer, and --context-token-audience (or the matching ORKA_CONTEXT_TOKEN_* env vars). The built-in profile validates RS256 TxTokens with typ: txntoken+jwt, issuer/audience/time claims, kid, and required iat, txn, scope, and req_wl claims. By default tokens are read from the raw Txn-Token header; Authorization: Bearer support is opt-in with --context-token-headers=Txn-Token,Authorization:Bearer.
Txn-Token: <txntoken+jwt>

When a Task is created through OIDC or context-token authentication, Orka stamps the verified caller identity into immutable spec.requestedBy (subject, issuer, username, email, groups, and roles when present). Context-token Task creation also stamps immutable spec.transaction plus transaction labels/annotations for audit correlation. Clients cannot provide or override requestedBy or transaction; requests containing top-level or nested spec.requestedBy/spec.transaction are rejected with 400. Right after creating such a Task the API seals orka.ai/requested-by-stamp, an HMAC over the server-assigned Task UID and the requester, next to the controller-only orka.ai/requested-by-source=api annotation; connector use trusts a requester only when that stamp verifies for the Task's own UID, so a Task planted with the source annotation while admission was disabled is never trusted. A coordination child created by a worker is sealed only through POST /internal/v1/tasks/:namespace/:taskName/children/:child/requester-stamp, which authenticates the caller as the parent's current worker and checks that the child is controller-owned by that parent and names the same requester; an owner reference alone never lets a child inherit authority. Because the seal is a second write after the create (or, for a coordination child, a request from the parent's worker), an API-stamped Task or controller-owned child less than two minutes old whose seal has not landed is retried at dispatch rather than dispatched without Connections; an older unsealed Task is treated as unverified. See Transaction Token integration for scope/tctx authorization, TTS exchange, delegation, and audit behavior.

Webhooks​

GitHub webhooks use HMAC verification instead of bearer-token authentication.

EndpointMethodDescription
/webhooks/githubPOSTAccept GitHub issues / pull_request label triggers and pull request events for exact-head repository monitor runs

The controller requires ORKA_GITHUB_WEBHOOK_SECRET and verifies the X-Hub-Signature-256 header. The orka:implement issue label queues the managed repository workflow; configured pause-label changes queue fresh reconciliation. Pull request events can also queue exact-head RepositoryMonitor runs when a matching monitor has spec.review.exactEventEnabled: true. See Issue-to-PR automation for configuration and webhook behavior.

Tasks​

EndpointMethodDescription
/api/v1/tasksPOSTCreate a task
/api/v1/tasksGETList tasks (paginated; labelSelector narrows by label with kubectl -l syntax, invalid selectors return 400)
/api/v1/tasks/:idGETGet task details
/api/v1/tasks/:idDELETECancel/delete task
/api/v1/tasks/:id/cancelPOSTCancel a queued or running task and keep it
/api/v1/tasks/:id/logsGETStream task logs
/api/v1/tasks/:id/resultGETGet task result
/api/v1/tasks/:id/memory-consolidation-reportGETGet a memory consolidation run's full report
/api/v1/tasks/:id/artifactsGETList task artifacts
/api/v1/tasks/:id/artifacts/:filenameGETDownload a task artifact
/api/v1/tasks/:id/execGET (WebSocket)Run an operator command in the Task's execution workspace (operator workspace access)
/api/v1/tasks/:id/files?path=GETCopy one file out of the Task's execution workspace
/api/v1/tasks/:id/files?path=&size=PUTCopy one file into the Task's execution workspace (taints the session)
/api/v1/tasks/:id/planGETGet task plan
/api/v1/tasks/:id/childrenGETGet child tasks

DELETE /api/v1/tasks/:id, GET /api/v1/tasks/:id/result, and POST /api/v1/tasks/:id/approvals/:approvalID/decision accept an optional uid query parameter. When it is set, a Task with that name but a different UID is reported as 404 task not found, so a client never deletes, reads, or decides an approval of a later Task that reused the name.

POST /api/v1/tasks takes name, namespace, and a spec with the full set of Task fields. As a shorthand, common fields — type, agentRef, prompt, image, command, args, env, timeout, priority, retryPolicy, workspace, agentRuntime, sessionRef, schedule, and a few more — can also go at the top level, as in the example below. Fields outside that set, such as resources or the schedule history limits, take effect only under spec.

POST /api/v1/tasks/:id/cancel records a cancel request and returns the Task's namespace, name, phase and message, with requested false when the Task already had a request or was already Cancelled. The optional body {"reason": "...", "uid": "..."} adds a reason to the recorded cancelled by <caller> message and, with uid, refuses a Task recreated under the name since the caller confirmed it. A Task that already succeeded or failed returns 409, and so does a scheduled Task, which is stopped by setting spec.suspend instead. The Task reaches Cancelled asynchronously, unless it finished first. For an agent Task the controller answers its pending permission requests as cancelled, cancels the prompt, and stops the agent if the cancel does not settle in time; the Task keeps its history and result, and its Session can continue with another Task. Cancelling requires update on tasks/cancel. POST /api/v1/sessions/:id/cancel stops a Session's current turn the same way: its in-flight chat request and its Pending and Running Tasks.

Task and Session event history, live streams, traces, forks, and approvals have their own endpoints, described in Execution events.

Get Task plan​

Retrieve the autonomous plan state for a task.

Endpoint: GET /api/v1/tasks/{id}/plan

Response (200):

{
"TaskName": "build-feature",
"Namespace": "default",
"Iteration": 3,
"Summary": "Completed auth module, working on CRUD endpoints",
"ProgressPct": 40,
"GoalComplete": false,
"PlanDocument": "# Plan\n- [x] Auth\n- [ ] CRUD\n...",
"CreatedAt": "2024-01-15T10:00:00Z",
"UpdatedAt": "2024-01-15T12:30:00Z"
}

Errors:

  • 404 — No plan found for this task
  • 501 — Plan store not configured

Sessions​

EndpointMethodDescription
/api/v1/sessionsGETList sessions
/api/v1/sessions/:idGETGet session transcript
/api/v1/sessions/:idDELETEDelete session

Memory​

Memory endpoints manage namespace-scoped durable memories and reviewable memory proposals. See Memory for the full lifecycle, worker behavior, and examples.

Durable memories​

EndpointMethodDescription
/api/v1/memoriesGETList durable memories
/api/v1/memoriesPOSTCreate durable memory
/api/v1/memories/:idGETGet durable memory
/api/v1/memories/:idPUTUpdate durable memory
/api/v1/memories/:idDELETESoft-delete durable memory
/api/v1/memories/:id/disablePOSTDisable memory for normal recall
/api/v1/memories/:id/enablePOSTRe-enable memory for normal recall

Common list query parameters: namespace, query/q, sessionName, agentName, taskName, parentTask, source, tags, ids, includeDisabled, includeDeleted, and limit.

Memory proposals​

EndpointMethodDescription
/api/v1/memory-proposalsGETList memory proposals
/api/v1/memory-proposalsPOSTCreate a memory proposal
/api/v1/memory-proposals/:idGETGet a memory proposal
/api/v1/memory-proposals/:id/reviewPOSTRecord a review decision without applying it
/api/v1/memory-proposals/:id/applyPOSTApply an accepted memory proposal into durable memory
/api/v1/memory-proposals/:id/archivePOSTArchive a proposal without applying it

Common list query parameters: namespace, taskName, agentName, type, status, query/q, and limit. Review returns the stored review record (id, namespace, status, reviewer, reviewNote, reviewedAt), and archive returns 204 No Content. Apply returns the linked durable memory JSON; repeated apply requests return the same memory. The server records the request's signed-in identity as reviewer and appliedBy; a body with a non-empty reviewer (review) or appliedBy (apply) returns 400 Bad Request, and a request without an identity returns 401 Unauthorized.

ACP runtime resources​

EndpointMethodDescription
/api/v1/runtime-poolsGETList controller-owned RuntimePools and lifecycle/admission/capacity status.
/api/v1/runtime-pools/:nameGETGet one RuntimePool.
/api/v1/agent-runtimesGETList external orka.harness.v2 registrations.
/api/v1/agent-runtimesPOSTCreate an external v2 registration.
/api/v1/agent-runtimes/:nameGETGet an external registration and observed capabilities.
/api/v1/agent-runtimes/:namePUTReplace an external registration.
/api/v1/agent-runtimes/:nameDELETEDelete an external registration.

RuntimePools are controller-owned for built-in Codex, OpenCode, Claude, and Copilot Tasks; the public API is read-only. A current-generation ready, strict-governed external registration can be selected through Agent.spec.runtime.runtimeRef. Orka revalidates its frozen endpoint, profile, authentication authority, and observed instance before dispatch and recovery mutations.

Agents​

EndpointMethodDescription
/api/v1/agentsPOSTCreate an agent
/api/v1/agentsGETList agents
/api/v1/agents/:nameGETGet agent details
/api/v1/agents/:name/system-promptGETGet the system prompt an agent reads from its systemPrompt.configMapRef
/api/v1/agents/:namePUTUpdate an agent
/api/v1/agents/:name/specPUTReplace the spec only if UID and generation still match
/api/v1/agents/:nameDELETEDelete an agent

Conditional spec update​

PUT /api/v1/agents/:name/spec?namespace=default requires patch on the named Agent, like the legacy PUT. Send the UID and generation from the Agent you last read, and the complete desired spec (omitted spec fields are removed):

{
"expectedUID": "the-agent-uid",
"expectedGeneration": 3,
"spec": {"model": {"provider": "openai", "name": "gpt-4o"}}
}

All three fields are required. The UID must be nonblank, generation a positive integer, and spec a non-null object. Success returns 200 with the updated Agent, including its UID and generation. Invalid requests return 400; existing namespace and authorization restrictions still apply. A missing Agent returns 404. A UID or generation mismatch returns 409 with agent UID or generation does not match, without applying the spec. The same expectations are checked on every optimistic-lock retry, so status-only writes can retry without accepting a spec edit or same-name replacement. Exhausted conflicts return 409 with agent was modified concurrently instead.

A timeout or lost response does not prove that the update failed. Read the Agent to reconcile before deciding what to do next. Older servers lack this route; never fall back to the unconditional PUT when conditional behavior is needed. The legacy PUT /api/v1/agents/:name retains its existing semantics.

Skills​

EndpointMethodDescription
/api/v1/skillsPOSTCreate a skill
/api/v1/skillsGETList skills
/api/v1/skills/:nameGETGet skill details
/api/v1/skills/:name/contentGETGet raw spec.content.inline markdown
/api/v1/skills/:namePUTUpdate a skill
/api/v1/skills/:nameDELETEDelete a skill

Gateways​

See Gateway API for the adapter contract, Kubernetes resources, durable ledger endpoints, filters, and retry workflow.

Tools​

EndpointMethodDescription
/api/v1/toolsGETList tools (built-in + CRDs)
/api/v1/tools/:nameGETGet tool details

GET /api/v1/tools/:name returns built-in tool metadata or the full Tool resource. Coordination tools are not listed; see Built-in tools.

Connector endpoints​

These routes manage Connections to a ConnectorProvider. They are available when the controller runs with --connectors-enabled and --connector-callback-base-url. Every route except the OAuth callback requires a verified OIDC or context-token identity carrying an issuer and subject; ServiceAccount bearer tokens are refused with 403. The callback is the provider's redirect target and carries no user token: the signed single-use consent state authenticates it against the pending consent instead, and the server-side PKCE verifier binds the code exchange to that consent. Under context-token authorization, reads need orka:connectors:read and every mutation needs orka:connectors:manage, so a delegated token narrowed to other work cannot inspect or revoke a person's accounts. A person sees and changes only Connections whose spec.subject matches their identity; a foreign Connection reads as 404. Responses never carry token material.

EndpointMethodDescription
/api/v1/connectorsGETList the provider catalog: name, display name, readiness, scopes, and tools with their read/write class.
/api/v1/connectionsGETList the caller's Connections.
/api/v1/connectionsPOSTBody {"provider": "github", "mode": "readOnly"}. Creates or reuses the caller's Connection for that provider and returns {"connection": ..., "authorizeURL": ...}. The browser opens authorizeURL; unknown body fields, including any subject, are rejected.
/api/v1/connections/:nameGETOne Connection.
/api/v1/connections/:namePUTBody {"mode": "readWrite"} (mode is required). Whenever the granted scopes do not cover the requested mode the response carries a new authorizeURL, so widening to readWrite, and retrying it, asks for the write scopes; narrowing takes effect immediately.
/api/v1/connections/:nameDELETEDisconnect. When the provider names a revocationURL, the controller's finalizer revokes the committed tokens (against the client and revocation endpoint sealed with them, so a moved token endpoint does not skip revocation); it then deletes the sealed material. GitHub has no revocation endpoint, so a GitHub disconnect only deletes the tokens Orka holds. A provider that refuses a revocation is best effort; a missing client Secret or key is not: custody and the finalizer are kept, and the disconnect retries until the Secret is restored, unless the provider itself is being deleted (namespace teardown), in which case the tokens are left to expire and the disconnect finishes.
/api/v1/connections/:name/authorizePOSTRestart consent for an existing Connection, for example after the provider revoked it.
/api/v1/connections/callbackGETOAuth redirect target. Unauthenticated: the signed single-use state authenticates it against the pending consent, and the server-side PKCE verifier binds the code exchange to that consent. It exchanges the code, parks the tokens sealed as a pending completion, and redirects to <callback base>/settings/connectors?status=pending&connection=<name>&namespace=<namespace>#completion=<token> (the namespace the consent was sealed in, which the completion must target), or ?status=error&reason=<code>. A provider that grants fewer scopes than the mode requires is refused (reason=scopes_denied); the issued token is discarded and left to expire, never revoked, because Orka cannot prove whose grant a token nobody committed belongs to. The requested set is the one sealed when consent started, never the provider's current configuration. A provider that omits the scope field granted the requested set; an explicitly empty scope is a grant of nothing and is refused. Granted scope lists are split on spaces and, as GitHub reports them, commas; a configured scope name may not contain a comma, so splitting never fabricates a required scope. A provider whose OAuth client changed since consent started is refused before any exchange (reason=provider_changed). So is a Connection whose mode changed while the person was at the provider (reason=mode_changed). Consents are numbered when they start; a callback from a consent older than one already parked or committed for the Connection is refused (reason=consent_superseded), and a newer callback replaces an older uncommitted completion, so callbacks that finish out of order never let an older grant replace a newer one.
/api/v1/connections/:name/completePOSTBody {"completion": "<token from the fragment>"}. Commits the parked tokens. Only the Connection's owner can call it and only with the one-time token the completing browser received, so a consent link forwarded to someone else can never bind their account to the sender's Connection. Requires the controller's custody finalizer to be present; after a disconnect the UID is tombstoned and completion is refused. A short-lived token without a refresh token that expired while the browser held the completion is refused (409) and the completion discarded, never committed as Ready. If a PUT changed the mode between the completion fence and the status write, the link is judged again from the committed material against the new mode. A Connection keeps at most 16 superseded grants for revocation at disconnect; a completion past that bound is refused (409) and the person disconnects and links again.

The consent state and the completion token are HMACs over random single-use nonces, keyed by a value derived from the controller's snapshot key. The pending consent row, sealed with the controller key, binds the nonce to the Connection UID, owner digest, provider, and a 10 minute expiry. Token material is sealed under a per-Connection data key that is itself wrapped by the controller key. Disconnect deletes both halves and tombstones the Connection, so the live store and later backups hold nothing; a backup taken before the disconnect still contains the sealed material and must be protected like the store itself. See ADR 0033. A Connection holds one pending consent at a time: a new authorize replaces the earlier one. A ConnectorProvider name is at most 63 characters, since it labels every Connection.

Agent Host Protocol​

With --enable-ahp-api, /ahp serves the Agent Host Protocol (versions 1.0.0 and 0.9.0) over WebSocket, one JSON-RPC message per text frame. See ADR 0034. In the harness-v2 execution mode, Orka's built-in runtimes are offered as AHP agents and each message runs as an agent Task; see Agent Host Protocol clients.

/ahp does not accept Orka bearer tokens. A client presents an AHP connection token as ?tkn=<token> or Authorization: Bearer <token>; desktop clients that connect by URL alone use wss://<API host>/ahp?tkn=<token>, which orka ahp connect prints. A missing, unknown, revoked or expired token gets 401 before the upgrade, and a browser (http or https) Origin gets 403. So does a token whose owner the API would no longer sign in: the token needs the configured OIDC issuer and a subject --oidc-allowed-subjects still admits. Orka logs the path of /ahp requests, never the query. Revoking or expiring a token, or its owner losing sign-in, closes every connection that uses it; open connections are rechecked every 30 seconds.

The token routes require a person's own verified OIDC sign-in carrying an issuer and subject; ServiceAccount bearer tokens and delegated context tokens are refused with 403. Orka stores only a hash of each token.

EndpointMethodDescription
/api/v1/ahp-tokensPOSTBody {"ttl": "720h", "description": "laptop"}, both optional. ttl defaults to 720h and is at most --ahp-token-max-ttl. description names the token for its owner, such as the device it is for: at most 256 characters, trimmed, no control characters. Returns 201 with {"id", "token", "description", "namespace", "expiresAt"}. The token is shown only in this response. A person holds at most 50 tokens that are neither revoked nor expired; past that the request returns 409 until they revoke one.
/api/v1/ahp-tokensGETList the caller's tokens, newest first, without their secrets: {"items": [{"id", "description", "namespace", "createdAt", "expiresAt", "revokedAt"}]}. The 50 newest expired or revoked tokens stay listed; older ones are removed when a new token is created.
/api/v1/ahp-tokens/:idDELETERevoke one of the caller's tokens and close its connections. Another person's token reads as 404.
/ahpGETThe AHP WebSocket endpoint.

Security​

Repository security endpoints manage RepositoryScan configurations and their generated threat models, scan runs, findings, patch proposals, and remediation pull requests. Like other /api/v1/* endpoints, they require ServiceAccount bearer token authentication.

EndpointMethodDescription
/api/v1/security/repositoriesPOSTCreate a repository scan
/api/v1/security/repositoriesGETList repository scans
/api/v1/security/repositories/:nameGETGet repository scan details
/api/v1/security/repositories/:namePUTUpdate repository scan spec
/api/v1/security/repositories/:nameDELETEDelete repository scan
/api/v1/security/repositories/:name/threat-modelGETGet latest threat model
/api/v1/security/repositories/:name/threat-modelPUTUpdate threat model
/api/v1/security/repositories/:name/scansGETList scan runs
/api/v1/security/repositories/:name/scansPOSTTrigger manual scan
/api/v1/security/repositories/:name/scans/:scanID/progressGETPer-stage Task counts for one scan run (see below)
/api/v1/security/repositories/:name/slicesGETList deterministic review slices
/api/v1/security/repositories/:name/slices/:sliceIDGETGet review slice details
/api/v1/security/repositories/:name/dropped-findingsGETList v2 dropped-finding diagnostics
/api/v1/security/repositories/:name/findingsGETList findings
/api/v1/security/findings/:idGETGet finding details
/api/v1/security/findings/:id/dismissPOSTDismiss finding
/api/v1/security/findings/:id/reopenPOSTReopen finding
/api/v1/security/findings/:id/validatePOSTTrigger validation
/api/v1/security/findings/:id/patchPOSTGenerate patch proposal
/api/v1/security/findings/:id/patchesGETList patch proposals
/api/v1/security/findings/:id/pull-requestPOSTCreate remediation PR

Common query parameters:

  • namespace — Kubernetes namespace to operate in.
  • limit — page size for list endpoints that support pagination.
  • continue — Kubernetes continue token for GET /api/v1/security/repositories.
  • cursor — store cursor for GET /api/v1/security/repositories/:name/scans, GET /api/v1/security/repositories/:name/slices, GET /api/v1/security/repositories/:name/dropped-findings, and GET /api/v1/security/repositories/:name/findings.
  • severity, validationStatus, state, sliceID, category — filters for GET /api/v1/security/repositories/:name/findings.
  • status — filter for GET /api/v1/security/repositories/:name/slices.
  • scanRunID, sliceID, layer — filters for GET /api/v1/security/repositories/:name/dropped-findings. layer is one of validation, filter, or cap.
  • reason — exact dropped-finding reason filter; use reason=contains=<text> for substring matching.
  • recommended=true — filters findings to recommended remediation candidates.

GET /api/v1/security/repositories/:name/scans/:scanID/progress returns the scan run, complete (whether the run has finished), and stages: one entry per pipeline stage in order (threat-model, mapper, review, validation, patch) with label, tasks, pending, running, succeeded, failed, cancelled, and failedTasks (the names of failed and cancelled Tasks). The server groups the run's Tasks by their orka.ai/security-scan-id and orka.ai/security-stage labels under its own identity, so the caller needs the same security read permission as listing scan runs and no Task list permission. Stages the scan has not reached yet are present with zero counts.

Create repository scan​

Endpoint: POST /api/v1/security/repositories

Request Body:

{
"name": "example-repo",
"namespace": "orka-system",
"spec": {
"provider": "github",
"repoURL": "https://github.com/example/app",
"branch": "main",
"ref": "v1.2.3",
"schedule": "0 2 * * *",
"validationMode": "light",
"validationMaxFindingsPerRun": 8,
"validationMinSeverity": "medium",
"validationMinConfidence": "medium",
"customScanInstructionsRef": {"name": "repo-security-policy", "key": "policy"},
"falsePositivePolicyRef": {"name": "repo-security-policy", "key": "false-positives"},
"analysisAgentRef": {"name": "security-reviewer"}
}
}

Response (201): The created RepositoryScan resource.

Required fields are name, spec.repoURL, and spec.analysisAgentRef.name. The API defaults or infers provider, owner, repository, branch, and validation mode where possible. Set spec.ref to pin scan tasks to a specific tag, branch, or commit SHA; when ref is set without branch, scan workspaces check out that ref directly instead of forcing the default main branch.

The request accepts the same RepositoryScan spec fields as the CRD, including automatic validation tuning (validationMaxFindingsPerRun, validationMinSeverity, validationMinConfidence) and ConfigMap-backed scanner policy refs (customScanInstructionsRef, falsePositivePolicyRef). Policy ConfigMaps must be in the same namespace and opt in with orka.ai/security-policy: "true" as a label or annotation.

Security findings workflow​

A typical remediation workflow is:

  1. List findings with GET /api/v1/security/repositories/:name/findings?namespace=orka-system&recommended=true.
  2. Inspect evidence with GET /api/v1/security/findings/:id.
  3. Optionally validate with POST /api/v1/security/findings/:id/validate.
  4. Generate a patch with POST /api/v1/security/findings/:id/patch.
  5. Review patch proposals with GET /api/v1/security/findings/:id/patches. A proposal is successful only after the governed publication is verified and the agent's patch result envelope matches the diff derived from the published commit; the stored diff and summary artifacts come from that verification, never from agent-written files.
  6. Create a remediation pull request with POST /api/v1/security/findings/:id/pull-request.

Review slice and dropped-output inspection:

  1. List slices with GET /api/v1/security/repositories/:name/slices?namespace=orka-system.
  2. Inspect one slice with GET /api/v1/security/repositories/:name/slices/:sliceID?namespace=orka-system.
  3. List rejected v2 model output with GET /api/v1/security/repositories/:name/dropped-findings?namespace=orka-system&scanRunID=scan_...&layer=filter&reason=contains=rate-limit.

Repository monitors​

Repository monitor endpoints manage RepositoryMonitor configurations and their durable monitor runs, issue/PR inventory, command events, workflow actions, typed action records, implementation jobs, GitHub mutation audit records, review/repair state, readiness state, and audit events.

EndpointMethodDescription
/api/v1/monitors/repositoriesPOSTCreate a repository monitor
/api/v1/monitors/repositoriesGETList repository monitors
/api/v1/monitors/repositories/:nameGETGet repository monitor details
/api/v1/monitors/repositories/:namePUTUpdate repository monitor spec
/api/v1/monitors/repositories/:nameDELETEDelete repository monitor
/api/v1/monitors/repositories/:name/runsPOSTTrigger a manual monitor run
/api/v1/monitors/repositories/:name/runsGETList monitor runs
/api/v1/monitors/repositories/:name/itemsGETList current monitor items
/api/v1/monitors/repositories/:name/commandsPOSTCreate an explicit issue/PR workflow command
/api/v1/monitors/commands?name=GETList durable command events. name is required.
/api/v1/monitors/commands/:idGETGet a command event
/api/v1/monitors/work-actions?name=GETList durable workflow actions and leases. name is required.
/api/v1/monitors/work-actions/:idGETGet a workflow action
/api/v1/monitors/actions?name=GETList typed action records. name is required.
/api/v1/monitors/actions/:idGETGet a typed action record
/api/v1/monitors/implementation-jobs?name=GETList issue implementation jobs. name is required.
/api/v1/monitors/implementation-jobs/:idGETGet an issue implementation job
/api/v1/monitors/mutations?name=GETList controller-owned GitHub mutation audit records. name is required.
/api/v1/monitors/mutations/:idGETGet a GitHub mutation audit record
/api/v1/monitors/events?name=GETList monitor audit events. name is required.

Common query parameters:

  • namespace - Kubernetes namespace to operate in.
  • limit - page size for list endpoints.
  • continue or cursor - pagination cursor for store-backed list endpoints.
  • kind, number, state, verdict, repairState, and automergeState - filters for GET /api/v1/monitors/repositories/:name/items.
  • name, runID, itemKind, itemNumber, and eventType — filters for GET /api/v1/monitors/events.
Six list endpoints require ?name=

/monitors/events, /monitors/commands, /monitors/actions, /monitors/work-actions, /monitors/implementation-jobs, and /monitors/mutations take the monitor name as a query parameter, not a path segment. Omitting it returns 400 with name query parameter is required. The /monitors/repositories/:name/... routes are the ones that use a path segment.

Context-token authorization scopes are orka:monitors:read for list/get endpoints, orka:monitors:write for create/update/delete, and orka:monitors:operate for manual run creation.

Create repository monitor​

Endpoint: POST /api/v1/monitors/repositories

Request Body:

{
"name": "example-app",
"namespace": "orka-system",
"spec": {
"provider": "github",
"repoURL": "https://github.com/example/app",
"branch": "main",
"gitSecretRef": {"name": "repo-monitor-github"},
"schedule": "*/30 * * * *",
"targets": {
"pullRequests": {
"enabled": true,
"includeDrafts": false,
"maxPerRun": 10
}
},
"agents": {
"reviewer": {"name": "repo-reviewer"}
},
"review": {
"event": "COMMENT",
"staleReviewTTL": "24h",
"exactEventEnabled": true
},
"policy": {
"protectedLabels": ["security-sensitive"],
"pauseLabels": ["orka:pause"]
},
"validation": {
"image": "ghcr.io/example/app-validation@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
}
}

Response (201): The created RepositoryMonitor resource.

Required fields are name, spec.repoURL, and spec.agents.reviewer.name when pull request monitoring is enabled. The API defaults or infers provider, owner, repository, branch, pull request enablement, pull request maxPerRun, and review.event where possible. spec.repoURL must be a credential-free GitHub repository root URL such as https://github.com/owner/repo, https://github.com/owner/repo.git, or git@github.com:owner/repo.git; pull request, issue, branch/tree, blob/file, commit, query-string, fragment, non-GitHub, HTTP, and embedded-credential URLs are rejected.

spec.validation.image optionally configures isolated pull request validation. The image must use an immutable @sha256: digest. The reviewer chooses one offline shell command after inspecting the repository. Orka runs it in the configured image against the exact read-only PR head, releases it only after a deny-all NetworkPolicy exists, and independently verifies the child Task before accepting a passed verdict. The image must contain /bin/sh, every required tool such as golangci-lint, Terraform, or Azure CLI, and any dependencies the command needs. Commands, args, credentials, and network access are not configured on the monitor.

GitHub pull request and issue targets are supported. Commit targets are rejected. review.requireGreenCI is supported for gating review selection on green CI. Pull request monitoring requires spec.agents.reviewer.name. The reviewer Agent must use a built-in claude, codex, or opencode runtime and omit spec.secretRef; the runtime proxy supplies provider credentials. External runtimeRef reviewers are rejected. Issue-only monitors can set targets.pullRequests.enabled: false and targets.issues.enabled: true. When gitSecretRef is set, the Git Secret must exist in the monitor namespace and contain a non-empty token, password, or GITHUB_TOKEN key.

Trigger manual monitor run​

Endpoint: POST /api/v1/monitors/repositories/{name}/runs

Request Body:

{
"targetKind": "pull_request",
"targetNumber": 123,
"targetSHA": "abc123"
}

The request body can be omitted to run a full inventory pass. targetKind may be empty, pull_request, or issue; targetNumber and targetSHA narrow the run to one issue, one PR, or an exact PR head. When targetNumber is set, the controller fetches that target directly from GitHub and does not retire unrelated monitor items. The API returns 409 when the monitor already has a queued or running run.

Create monitor command​

Endpoint: POST /api/v1/monitors/repositories/{name}/commands

Request Body:

{
"kind": "issue",
"number": 123,
"intent": "plan",
"targetSHA": ""
}

Supported issue intents are triage, research, plan, implement, decompose, stop, and resume. Supported pull request intents are review, fix, fix_ci, update_branch, stop, and resume. Head-bound pull request commands (review, fix, fix_ci, update_branch) must include targetSHA; stop and resume can omit it. The command creation endpoint always requires orka:monitors:operate. Mutating intents (including implement, decompose, fix, fix_ci, update_branch, stop, and resume) additionally require orka:monitors:write; review also requires monitor-write when review publishing is enabled. The endpoint validates that the target kind is enabled, records a durable command event, and queues a targeted monitor run.

List monitor commands, actions, implementations, and mutations​

Endpoints:

  • GET /api/v1/monitors/commands?namespace=&name=&kind=&number=&intent=&status=
  • GET /api/v1/monitors/commands/{id}
  • GET /api/v1/monitors/work-actions?namespace=&name=&kind=&number=&intent=&desiredAction=&status=&taskName=
  • GET /api/v1/monitors/work-actions/{id}
  • GET /api/v1/monitors/actions?namespace=&name=&kind=&number=&actionKind=&taskName=
  • GET /api/v1/monitors/actions/{id}
  • GET /api/v1/monitors/implementation-jobs?namespace=&name=&issueNumber=&phase=&taskName=
  • GET /api/v1/monitors/implementation-jobs/{id}
  • GET /api/v1/monitors/implementation-jobs/{id}/patch-preview
  • GET /api/v1/monitors/mutations?namespace=&name=&kind=&number=&operation=&status=
  • GET /api/v1/monitors/mutations/{id}

Command events record label/API intake, actor/source authorization, target SHA/snapshot bindings, status, and errors. Work actions are the durable queue/lease view for prerequisites and follow-up work. Action records store typed triage/research/plan/implementation/review/repair/readiness outcomes. Implementation jobs track issue coding attempts, patch artifacts, validation state, branches, and linked PRs. Mutation records audit every controller-owned GitHub write such as label consumption, review submission, branch pushes, PR creation, and readiness statuses.

See Repository Monitors for the full workflow and CRD example.

Auth​

EndpointMethodDescription
/api/v1/auth/validateGETValidate auth token

Secrets​

EndpointMethodDescription
/api/v1/secretsGETList secret names (metadata only)

Chat​

EndpointMethodDescription
/api/v1/chatPOSTSend message (SSE streaming or JSON)
/api/v1/chat/configGETGet chat configuration and available tools
/api/v1/chat/:sessionIdDELETECancel a chat session

See Interactive Chat for full chat documentation.

OpenAI-compatible API​

EndpointMethodDescription
/openai/v1/chat/completionsPOSTChat completions (streaming & non-streaming)
/openai/v1/responsesPOSTStateless Responses (streaming & non-streaming; requires store:false)
/openai/v1/modelsGETList available models

See OpenAI Compatibility for details.

Anthropic-compatible API​

EndpointMethodDescription
/anthropic/v1/messagesPOSTCreate a message (streaming & non-streaming)
/anthropic/v1/modelsGETList available models

The /anthropic/v1/messages endpoint injects built-in tools and runs server-side tool execution by default. Set X-Orka-Tools: disabled header to use as a transparent proxy instead. See Anthropic Compatibility for details.

Internal API​

Workers call /internal/v1 routes to submit results and artifacts, read transcripts, save plans, and exchange messages. They are not for clients; see Controller internals.

Health​

EndpointMethodDescription
/healthzGETHealth check
/readyzGETReadiness check

Example usage​

# Create a task
curl -X POST http://localhost:8080/api/v1/tasks \
-H "Authorization: Bearer $(kubectl -n orka-system create token orka-client)" \
-H "Content-Type: application/json" \
-d '{
"name": "my-task",
"type": "ai",
"agentRef": {"name": "assistant"},
"prompt": "Explain microservices architecture"
}'

# Get task result
curl http://localhost:8080/api/v1/tasks/my-task/result \
-H "Authorization: Bearer $(kubectl -n orka-system create token orka-client)"

# List task artifacts
curl http://localhost:8080/api/v1/tasks/my-task/artifacts \
-H "Authorization: Bearer $(kubectl -n orka-system create token orka-client)"

# Download an artifact
curl -L http://localhost:8080/api/v1/tasks/my-task/artifacts/output.json \
-H "Authorization: Bearer $(kubectl -n orka-system create token orka-client)" \
-o output.json

# Chat with SSE streaming
curl -N http://localhost:8080/api/v1/chat \
-H "Authorization: Bearer $(kubectl -n orka-system create token orka-client)" \
-H "Content-Type: application/json" \
-d '{
"message": "Create an AI task that summarizes Kubernetes best practices",
"sessionId": "my-session"
}'

Built-in tools​

The tools Orka gives agents, and their parameters, are documented in Built-in tools.