Skip to content

Issue a command to a component

POST
/components/{name}/commands:issue
curl --request POST \
--url 'https://example.com/api/v1/components/example/commands:issue?wait_timeout=30' \
--header 'Content-Type: application/json' \
--data '{ "command_type": "example", "instance": "example", "params": "example", "value": "example" }'

Records a command invocation, writes a caused event, and (for a settleable command) opens an intended value the observed value settles against. Answers with the command as it stands (as the command read returns it) and the computed settlement; with wait, once it settles, fails or times out, or wait_timeout passes. Gated by command:issue, whose scope is resolved on the component tier from that permission (not from component:read); a component outside the caller’s component:read is a non-disclosing 404, and one it can read but not command is a 403.

name
required

The component’s name, or a dotted address (e.g. boi.17c.415a.$comp.display-1)

string

The component’s name, or a dotted address (e.g. boi.17c.415a.$comp.display-1)

wait

Block until the command settles, fails or times out, or until wait_timeout passes, and answer with where it stands then. Refused with a 429, before anything is issued, while too many commands are already being waited on

boolean

Block until the command settles, fails or times out, or until wait_timeout passes, and answer with where it stands then. Refused with a 429, before anything is issued, while too many commands are already being waited on

wait_timeout

How long a wait may block, in seconds (1 to 120). A command still in flight when it passes is answered as it stands, its phase saying where

integer format: int64
default: 30 >= 1 <= 120

How long a wait may block, in seconds (1 to 120). A command still in flight when it passes is answered as it stands, its phase saying where

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
command_type
required

The command_type to invoke

string
>= 1 characters
instance

The series discriminator (e.g. an endpoint), when the target is instanced

string
params

The invocation params, stored on the command and the caused event

value

The intended value for the target property (a settleable command)

OK

Media type application/json

One instruction sent to a component, typed by a command type, and its outcome.

object
$schema

A URL to the JSON Schema for this object.

string format: uri
caused_event_id

The command-issued event it put on the component’s timeline

integer format: int64
command_type
required

What the component was told to do

string
component
required

The component it was issued to, by name

string
component_id
required

The component’s uuid, the stable form of component

string
deadline
required

When its window closes (its settle window, or a fire-and-forget command’s delivery window); a command still issued past it is timed out by the next sweep

string format: date-time
delivered_at

When an outpost last took it from its queue

string format: date-time
delivery_count
required

How many times an outpost has taken it: 0 while queued, 1 once delivered, more when it went silent past the redelivery wait and was taken again

integer format: int64
driver

The driver whose binding renders and settles it, by name

string
endpoint

The endpoint it rides, by name: the one an outpost took it over, else the one an outpost would (its driver binds the type); absent when no endpoint can carry it

string
endpoint_id

The endpoint’s uuid

string
exec_error

The execution’s failure, as its outpost reported it, masked of credentials

string
executed_at

When its outpost’s execution report landed

string format: date-time
first_delivered_at

When an outpost first took it from its queue; a redelivery moves delivered_at, not this

string format: date-time
id
required

The command’s id: with its component, its address (a command has no name)

integer format: int64
instance

The series discriminator it was issued with, if any

string
intended

The value it set; absent for a fire-and-forget command

issued_at
required

When it was issued

string format: date-time
issuer

Who issued it, by name; empty once that user is purged (the audit log keeps the name)

string
issuer_id

The issuer’s uuid, the actor on the command’s audit row

string
observed

The sample of its target that decided it, when an observation did

object
at
required

When it was observed

string format: date-time
value
required

The observed value

outpost

The outpost that endpoint is placed on, by name

string
params

The invocation params

phase
required

Where it sits now: queued for its outpost; delivered to it (a binding that settles on observation, or a fire-and-forget command its outpost’s execution report decides); awaiting the reply that settles it; awaiting the observation that does, within its window; or, once terminal, its status

string
Allowed values: queued delivered awaiting-reply awaiting-observation settled failed timed-out
reason

Why it reached its terminal status, in words: the reply that confirmed it, the value observed instead, where it stopped when it timed out

string
reply

The component’s answer, as its execution report carried it, masked of the endpoint’s credentials and anything labeled a credential, and capped; absent until a report lands

string
settle_mode
required

How its driver binding says it settles: from the component’s reply, from the next observation of its target, or none (it sets nothing, so its outpost’s execution report decides it)

string
Allowed values: reply observation none
settle_window_seconds
required

How long it waits for its evidence

integer format: int64
settled_at

When it reached its terminal status

string format: date-time
settled_by

What decided it, once terminal: its reply (for a fire-and-forget command, its outpost’s execution report), an observation of its target, or its window closing on no evidence; issue marks a fire-and-forget command recorded before it waited on its report

string
Allowed values: issue reply observation window
settled_event_id

The event its terminal status put there: command-settled, command-failed or command-timed-out

integer format: int64
settlement

On an issue’s answer only: the computed settlement at that moment (none/pending/settled/failed)

string
Allowed values: none pending settled failed
status
required

The recorded status: issued until a terminal settled, failed, or timed-out

string
Allowed values: issued settled failed timed-out
target

The property or metric it sets, by name

string
target_kind

The lane of the value it sets; absent for a fire-and-forget command

string
Allowed values: property metric

Example

{
"$schema": "/api/v1/schemas/CommandBody.json",
"phase": "queued",
"settle_mode": "reply",
"settled_by": "issue",
"settlement": "none",
"status": "issued",
"target_kind": "property"
}

Error

Media type application/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}