Skip to content

One request

GET
/api/v1/requests/{id}
curl --request GET \
--url http://localhost:11044/api/v1/requests/example \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'
id
required
string

The request’s id

The request

Media typeapplication/json

A gateway call held for a person to approve or reject: the verb a routine wants called, or a person’s own held call, with its arguments, why, and the evidence. Listed by GET /requests, fetched by GET /requests/{id}, returned by POST /requests/{id}/decision.

object
about

Whom or what the call is about, by name (e.g. the customer a note goes on); null when the call did not say

string
agent

Agent whose run raised it, shown to the approver as who is asking; null when no agent holds the routine or a person asked

string
args
required

The verb’s input, as a JSON-encoded string

string
decidedAt

When it was approved or rejected, or for an expired one its expiresAt, as an ISO-8601 instant; null while pending

string format: date-time
decidedBy

Username of the person who approved or rejected it; null while pending and for an expired request

string
detail
required

What would happen and why, in the business’s words; what the approver reads first

string
evidence
required

Rows the routine read that made it ask, as it saw them when it asked; at most 50, empty when it gave none

Array<object>
object
key
additional properties
expiresAt
required

When an unanswered request expires, as an ISO-8601 instant; three days after raisedAt

string format: date-time
id
required

Identifier of the request, req_ followed by a UUID; the {id} in /requests/{id}

string
ownerId
required

User id of the person in whose world the request was raised, and who decides it

string
quote

Text the call would write where people read it (a note, a message), as it would land; null when the call writes none or did not say

string
raisedAt
required

When it was raised, as an ISO-8601 instant

string format: date-time
raisedBy

User id of the person whose own call, made outside any routine run, was held for approval; null when a routine or an agent asked

string
raisedByName

Display name of raisedBy at the time they asked; null when raisedBy is null

string
reason

Why it was rejected, as the rejecter wrote it; null unless status is REJECTED

string
result

What the verb answered once approved, or its error when status is FAILED, truncated to 2000 characters; null until approved

string
routine
required

Name of the routine that raised it; (unnamed routine) when no routine did, as for a person’s own held call

string
runId

Id of the routine run it was raised in; null when it was raised outside any run

string
secondPersonAsked
required

True when the verb’s publisher asks for an approver other than the caller. Advisory: the world does not enforce it

boolean
selfApproved
required

True when it was approved by the same person who raised it (raisedBy); allowed, and recorded so

boolean
status
required

PENDING until decided; then APPROVED (the verb succeeded), FAILED (approved, but the verb answered an error), REJECTED, or EXPIRED (nobody answered before expiresAt)

string
Allowed values: PENDING APPROVED FAILED REJECTED EXPIRED
untrusted
required

Text from outside the business the routine read before asking, each as source: what, sorted; the draft came after it. Empty when it read none

Array<string>
verb
required

Gateway tool to call on approval, e.g. odoo_partnerMessagePost

string

Example

{
"status": "PENDING"
}

No authenticated principal

One of:

A refusal with a machine-readable code and a plain-language message. ApiErrorAdvice answers it for a failed validation, a missing resource or a conflicting state, and some controllers answer it directly

object
code
required

Machine-readable key to branch on, such as validation_failed, unknown_field, not_found or conflict. Open: a surface may answer codes of its own

string
detail

Extra context where there is some, such as the fields a body may carry; null otherwise

string
message
required

A plain-language explanation, written to be shown. Never carries an exception message

string

Example generated

{
"code": "example",
"detail": "example",
"message": "example"
}

No such request in your world