Skip to main content
POST
Ask what would happen to a call, as an agent
Takes the agent’s own credential (oc_agent_...) and nothing else. See the Agent quickstart for the commands that call it. What the gateway would decide for one call of yours, with nothing sent. It is advice: the call itself is decided again when you make it. It reads no credential, counts against no rate limit of your rules and no usage, and cannot see the call’s body.
Availability: OneCLI Cloud and self-hosted.

Authorizations

Authorization
string
header
required

An agent's own credential (oc_agent_...). It reads what that agent can use and nothing else.

Headers

Idempotency-Key
string

Not accepted on this call. Sending it is 400 bad_request.

Required string length: 1 - 255

Body

application/json
method
string
required

The HTTP method of the call you plan.

Pattern: ^[A-Za-z]{1,16}$
url
string
required

The full address of the call you plan.

Maximum string length: 8192
Pattern: ^https?:\/\/[^\s/?#]+/i

Response

What would happen.

code
string | null
required

Set when a usage limit refuses the call: the error code the call itself would be answered with. null: no usage limit refuses it.

decision
enum<string>
required

allowed: it would be sent with your item. blocked: a rule or a usage limit refuses it. needs_approval: a person must approve it first. no_item: nothing of yours serves it, so it would be sent with no credential. destination_refused: the gateway does not send there.

Available options:
allowed,
blocked,
needs_approval,
no_item,
destination_refused
item
object | null
required

The item the call would use, by its id in your list of items. null: none.

reason
string
required

The decision in words, with what it could not take into account.

rule
object | null
required

The rule that decided. null: no rule did, or the rule is set above your vault and does not block.