Admit a governed action for an external runtime and run it
const url = 'https://api.katara.com/katara/v1/orgs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/actions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"tool":{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","version":1,"integrity":"example"},"arguments":{"org_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","environment_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","version":1,"integrity":"example","media_type":"text/plain","size_bytes":1},"grant_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","budget_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","expires_at":"2026-04-15T12:00:00Z","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.katara.com/katara/v1/orgs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/actions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "tool": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "version": 1, "integrity": "example" }, "arguments": { "org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "environment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "version": 1, "integrity": "example", "media_type": "text/plain", "size_bytes": 1 }, "grant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "budget_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "expires_at": "2026-04-15T12:00:00Z", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'For an external agent’s key. Admits the action under the caller’s id with fresh authorization, policy, approval and budget checks, and runs it through the tool engine when nothing stands in the way; the tool’s output comes back inline and is not stored. An action waiting for a person’s approval answers 202; submit the same request again once it is approved to run it. Repeating an action already claimed runs nothing. Tools that need a Katara-held credential or a price answer 409 managed_run_required: only a managed run can use them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”The action to admit under the caller’s own id. The same id with the same body finds the same action; the same id with another body conflicts.
object
object
object
Responses
Section titled “Responses”Admitted; ran, refused or expired.
object
The admitted action as the runtime that submitted it sees it. It carries no arguments and no approver.
object
The tool’s response, validated against the version’s output schema. Present only after a reported success.
Example
{ "action": { "effect": "read_only", "decision": "allow", "state": "ready" }, "outcome": "reported_success"}Admitted; waiting for approval.
object
The admitted action as the runtime that submitted it sees it. It carries no arguments and no approver.
object
The tool’s response, validated against the version’s output schema. Present only after a reported success.
Example
{ "action": { "effect": "read_only", "decision": "allow", "state": "ready" }, "outcome": "reported_success"}The request is malformed or names what the catalog decides.
The key is not an external agent’s, or its grant, policy or budget refuses the action.
The tool version, grant or budget is unavailable in this environment.
Managed_run_required: the tool needs a Katara-held credential or a price. conflict: the id names another action.
The action or its authority could not be checked.