Command Run
CommandRun is one execution of a command on a Channel: the request, from the caller, and the outcome, from the channel's client. Create one at the Space, naming the command and optionally the Channel; without a Channel, the command is resolved to the one Channel in the Space that declares it. A Pending run waits for the client until its Deadline; a Delivered run has a fixed time to its outcome.
Operations
| Method | Endpoint | Description |
|---|---|---|
GET |
/command_run |
List command runs across the Organization |
GET |
/space/{space_id}/command_run |
List the Space's command runs |
GET |
/space/{space_id}/command_run/{command_run_id} |
Get a command run |
POST |
/space/{space_id}/channel/{channel_id}/command_run/{command_run_id}/result |
Report a command run's result |
POST |
/space/{space_id}/command_run |
Run a command on a Channel |
POST |
/space/{space_id}/command_run/{command_run_id}/cancel |
Cancel a Pending command run |
List command runs across the Organization
GET /command_run
Operation ID: ListAllCommandRuns
Parameters
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
where |
string | The specified string is an expression for the purpose of filtering the list of CommandRuns returned. The expression syntax was inspired by SQL. It supports conjunctions using AND of relational expressions of the form attribute operator attribute_or_literal. The attribute names are case-sensitive and PascalCase, as in the JSON encoding. Strings support the following operators: <, >, <=, >=, =, !=, LIKE, NOT LIKE, ILIKE, ~~, !~~, ~, ~*, !~, !~*, IN, NOT IN. String pattern operators: LIKE and ~~ for pattern matching with % and _ wildcards, ILIKE for case-insensitive pattern matching, NOT LIKE and !~~ for negated pattern matching. String regex operators: ~ for regex matching, ~* for case-insensitive regex, !~ and !~* for regex not matching (case-sensitive and insensitive). Integers support the following operators: <, >, <=, >=, =, !=, IN, NOT IN. UUIDs and boolean attributes support equality and inequality only. UUID and time literals must be quoted as string literals. String literals are quoted with single quotes, such as 'string'. Time literals use the same form as when serialized as JSON, such as: CreatedAt > '2025-02-18T23:16:34'. Integer and boolean literals are also supported for attributes of those types. Arrays support the ? operator to to match any element of the array, as in FromLinkID ? '7c61626f-ddbe-41af-93f6-b69f4ab6d308'. Arrays can perform LEN() to check for length, as in LEN(FromLinkID) > 0. An attribute naming a list of other entities can be filtered on their attributes with a * segment, as in FromLink.*.Slug = 'upgrade-app', which holds when any element satisfies it. Without the * such a reference is an error, since it names no single value to compare. Map support the dot notation to specify a particular map key, as in Labels.tier = 'Backend'. Maps support IS NULL and IS NOT NULL with dot notation to check for key absence or presence, as in Labels.tier IS NULL (key doesn't exist) or Labels.tier IS NOT NULL (key exists). Comparison results can be tested with IS TRUE, IS FALSE, IS NOT TRUE, and IS NOT FALSE. These are useful for nullable columns: MergeSourceID = '<uuid>' IS NOT FALSE matches rows where MergeSourceID equals the value OR is NULL. The IN and NOT IN operators accept a comma-separated list of values in parentheses, such as Slug IN ('slugone', 'slugtwo') or Labels.environment IN ('prod', 'staging'). Conjunctions are supported using the AND operator. An example conjunction is: CreatedAt >= '2025-01-07' AND Slug = 'test' AND Labels.mykey = 'myvalue'. Supported attributes for filtering on CommandRun: ChannelID, Command, CommandRunID, CompletedAt, CreatedAt, CreatedBy, Deadline, DeliveredAt, OrganizationID, SpaceID, Status, TargetID, TimeoutAt, UnitID. The whole string must be query-encoded. |
|
filter |
string | UUID of a Filter entity to apply to the CommandRun list. The Filter must be in the same Organization as the user credentials. The Filter's From field must match the entity type being filtered (CommandRun). For Space-resident entities, if the Filter has a FromSpaceID, it must match the operation's SpaceID. The Filter's Where clause will be combined with any explicit 'where' parameter using AND logic. If both 'filter' and 'where' parameters are specified, they are combined with AND logic. | |
contains |
string | Free text search that approximately matches the specified string against string fields and map keys/values. The search is case-insensitive and uses pattern matching to find entities containing the text. Searchable string fields include attributes like Slug, DisplayName, and string-typed custom fields. For map fields (like Labels and Annotations), the search matches both map keys and values. The search uses OR logic across all searchable fields, so matching any field will return the entity. If both 'where' and 'contains' parameters are specified, they are combined with AND logic. Searchable fields for CommandRun include string and map-type attributes from the queryable attributes list. The whole string must be query-encoded. | |
include |
string | Include clause for expanding related entities in the response for CommandRun. The attribute names are case-sensitive, PascalCase, and expected in a comma-separated list format as in the JSON encoding. Supported attributes for CommandRun are . The whole string must be query-encoded. | |
select |
string | Select clause for specifying which fields to include in the response for CommandRun. The attribute names are case-sensitive, PascalCase, and expected in a comma-separated list format as in the JSON encoding. If not specified, all fields are returned. Entity and parent IDs (like OrganizationID, SpaceID, CommandRunID) and Slug are always returned regardless of the select parameter. Fields used in where and contains filters, fields named by order_by, and fields read by the columns of the View named by view are also automatically included. Example: 'DisplayName,CreatedAt,Labels' will return only those fields plus the required ID and Slug fields. The whole string must be query-encoded. | |
limit |
integer | Maximum number of CommandRun entities to return. If not specified, all matching entities are returned. Values greater than 1000 are rejected with 400. When there may be more entities, the response has a ConfigHub-Continue header to pass as the continue parameter of the next request. | |
order_by |
string | Comma-separated list of fields to sort CommandRun results by, each in the form 'ASC|DESC:FieldName' or just 'FieldName'. Field names are case-sensitive and PascalCase, as in the JSON encoding. Sort direction defaults to ASC when the 'DIRECTION:' prefix is omitted. Supported attributes for ordering CommandRun: ChannelID, Command, CommandRunID, CompletedAt, CreatedAt, CreatedBy, Deadline, DeliveredAt, OrganizationID, Status, TargetID, TimeoutAt, UnitID. Example: 'DESC:CreatedAt' or 'DisplayName,DESC:CreatedAt'. Results are ordered by the CommandRun's ID after the fields named, and by the ID alone if none are. The whole string must be query-encoded. | |
continue |
string | The token from the ConfigHub-Continue header of the previous page, to return the CommandRun entities after it. The request's other parameters, except limit, must be the same as those of the request that returned the token. Keep reading until a response has no such header: a page can hold fewer entities than the limit, or none, and still be followed by more. |
Responses
| Status | Description | Content-Type | Schema |
|---|---|---|---|
| 200 | OK | application/json |
Array of CommandRun |
| 400 | CommandRun request is invalid (Bad Request). | application/json |
StandardErrorResponse |
| 401 | Unauthorized access. | application/json |
StandardErrorResponse |
| 403 | Forbidden access. | application/json |
StandardErrorResponse |
| 404 | CommandRun not found. | application/json |
StandardErrorResponse |
| 500 | Something went wrong while processing CommandRun. | application/json |
StandardErrorResponse |
| default | Unexpected error. | application/json |
StandardErrorResponse |
List the Space's command runs
GET /space/{space_id}/command_run
Operation ID: ListCommandRuns
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
space_id |
string | ✓ | Unique identifier for a space_id |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
where |
string | The specified string is an expression for the purpose of filtering the list of CommandRuns returned. The expression syntax was inspired by SQL. It supports conjunctions using AND of relational expressions of the form attribute operator attribute_or_literal. The attribute names are case-sensitive and PascalCase, as in the JSON encoding. Strings support the following operators: <, >, <=, >=, =, !=, LIKE, NOT LIKE, ILIKE, ~~, !~~, ~, ~*, !~, !~*, IN, NOT IN. String pattern operators: LIKE and ~~ for pattern matching with % and _ wildcards, ILIKE for case-insensitive pattern matching, NOT LIKE and !~~ for negated pattern matching. String regex operators: ~ for regex matching, ~* for case-insensitive regex, !~ and !~* for regex not matching (case-sensitive and insensitive). Integers support the following operators: <, >, <=, >=, =, !=, IN, NOT IN. UUIDs and boolean attributes support equality and inequality only. UUID and time literals must be quoted as string literals. String literals are quoted with single quotes, such as 'string'. Time literals use the same form as when serialized as JSON, such as: CreatedAt > '2025-02-18T23:16:34'. Integer and boolean literals are also supported for attributes of those types. Arrays support the ? operator to to match any element of the array, as in FromLinkID ? '7c61626f-ddbe-41af-93f6-b69f4ab6d308'. Arrays can perform LEN() to check for length, as in LEN(FromLinkID) > 0. An attribute naming a list of other entities can be filtered on their attributes with a * segment, as in FromLink.*.Slug = 'upgrade-app', which holds when any element satisfies it. Without the * such a reference is an error, since it names no single value to compare. Map support the dot notation to specify a particular map key, as in Labels.tier = 'Backend'. Maps support IS NULL and IS NOT NULL with dot notation to check for key absence or presence, as in Labels.tier IS NULL (key doesn't exist) or Labels.tier IS NOT NULL (key exists). Comparison results can be tested with IS TRUE, IS FALSE, IS NOT TRUE, and IS NOT FALSE. These are useful for nullable columns: MergeSourceID = '<uuid>' IS NOT FALSE matches rows where MergeSourceID equals the value OR is NULL. The IN and NOT IN operators accept a comma-separated list of values in parentheses, such as Slug IN ('slugone', 'slugtwo') or Labels.environment IN ('prod', 'staging'). Conjunctions are supported using the AND operator. An example conjunction is: CreatedAt >= '2025-01-07' AND Slug = 'test' AND Labels.mykey = 'myvalue'. Supported attributes for filtering on CommandRun: ChannelID, Command, CommandRunID, CompletedAt, CreatedAt, CreatedBy, Deadline, DeliveredAt, OrganizationID, SpaceID, Status, TargetID, TimeoutAt, UnitID. The whole string must be query-encoded. |
|
filter |
string | UUID of a Filter entity to apply to the CommandRun list. The Filter must be in the same Organization as the user credentials. The Filter's From field must match the entity type being filtered (CommandRun). For Space-resident entities, if the Filter has a FromSpaceID, it must match the operation's SpaceID. The Filter's Where clause will be combined with any explicit 'where' parameter using AND logic. If both 'filter' and 'where' parameters are specified, they are combined with AND logic. | |
contains |
string | Free text search that approximately matches the specified string against string fields and map keys/values. The search is case-insensitive and uses pattern matching to find entities containing the text. Searchable string fields include attributes like Slug, DisplayName, and string-typed custom fields. For map fields (like Labels and Annotations), the search matches both map keys and values. The search uses OR logic across all searchable fields, so matching any field will return the entity. If both 'where' and 'contains' parameters are specified, they are combined with AND logic. Searchable fields for CommandRun include string and map-type attributes from the queryable attributes list. The whole string must be query-encoded. | |
include |
string | Include clause for expanding related entities in the response for CommandRun. The attribute names are case-sensitive, PascalCase, and expected in a comma-separated list format as in the JSON encoding. Supported attributes for CommandRun are . The whole string must be query-encoded. | |
select |
string | Select clause for specifying which fields to include in the response for CommandRun. The attribute names are case-sensitive, PascalCase, and expected in a comma-separated list format as in the JSON encoding. If not specified, all fields are returned. Entity and parent IDs (like OrganizationID, SpaceID, CommandRunID) and Slug are always returned regardless of the select parameter. Fields used in where and contains filters, fields named by order_by, and fields read by the columns of the View named by view are also automatically included. Example: 'DisplayName,CreatedAt,Labels' will return only those fields plus the required ID and Slug fields. The whole string must be query-encoded. | |
limit |
integer | Maximum number of CommandRun entities to return. If not specified, all matching entities are returned. Values greater than 1000 are rejected with 400. When there may be more entities, the response has a ConfigHub-Continue header to pass as the continue parameter of the next request. | |
order_by |
string | Comma-separated list of fields to sort CommandRun results by, each in the form 'ASC|DESC:FieldName' or just 'FieldName'. Field names are case-sensitive and PascalCase, as in the JSON encoding. Sort direction defaults to ASC when the 'DIRECTION:' prefix is omitted. Supported attributes for ordering CommandRun: ChannelID, Command, CommandRunID, CompletedAt, CreatedAt, CreatedBy, Deadline, DeliveredAt, OrganizationID, Status, TargetID, TimeoutAt, UnitID. Example: 'DESC:CreatedAt' or 'DisplayName,DESC:CreatedAt'. Results are ordered by the CommandRun's ID after the fields named, and by the ID alone if none are. The whole string must be query-encoded. | |
continue |
string | The token from the ConfigHub-Continue header of the previous page, to return the CommandRun entities after it. The request's other parameters, except limit, must be the same as those of the request that returned the token. Keep reading until a response has no such header: a page can hold fewer entities than the limit, or none, and still be followed by more. |
Responses
| Status | Description | Content-Type | Schema |
|---|---|---|---|
| 200 | OK | application/json |
Array of CommandRun |
| 400 | CommandRun request is invalid (Bad Request). | application/json |
StandardErrorResponse |
| 401 | Unauthorized access. | application/json |
StandardErrorResponse |
| 403 | Forbidden access. | application/json |
StandardErrorResponse |
| 404 | CommandRun not found. | application/json |
StandardErrorResponse |
| 500 | Something went wrong while processing CommandRun. | application/json |
StandardErrorResponse |
| default | Unexpected error. | application/json |
StandardErrorResponse |
Get a command run
GET /space/{space_id}/command_run/{command_run_id}
Reads the run. With ?wait=
Operation ID: GetCommandRun
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
space_id |
string | ✓ | Unique identifier for a space_id |
command_run_id |
string | ✓ | Unique identifier for a command_run_id |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
wait |
integer | Seconds to hold for a terminal status; at most 25. | |
select |
string | Select clause for specifying which fields to include in the response for CommandRun. The attribute names are case-sensitive, PascalCase, and expected in a comma-separated list format as in the JSON encoding. If not specified, all fields are returned. Entity and parent IDs (like OrganizationID, SpaceID, CommandRunID) and Slug are always returned regardless of the select parameter. Fields used in where and contains filters, fields named by order_by, and fields read by the columns of the View named by view are also automatically included. Example: 'DisplayName,CreatedAt,Labels' will return only those fields plus the required ID and Slug fields. The whole string must be query-encoded. |
Responses
| Status | Description | Content-Type | Schema |
|---|---|---|---|
| 200 | CommandRun is one execution of a command on a Channel: the request, from the caller, and the outcome, from the channel's client. Create one at the Space, naming the command and optionally the Channel; without a Channel, the command is resolved to the one Channel in the Space that declares it. A Pending run waits for the client until its Deadline; a Delivered run has a fixed time to its outcome. | application/json |
CommandRun |
| 400 | CommandRun request is invalid (Bad Request). | application/json |
StandardErrorResponse |
| 401 | Unauthorized access. | application/json |
StandardErrorResponse |
| 403 | Forbidden access. | application/json |
StandardErrorResponse |
| 404 | CommandRun not found. | application/json |
StandardErrorResponse |
| 500 | Something went wrong while processing CommandRun. | application/json |
StandardErrorResponse |
| default | Unexpected error. | application/json |
StandardErrorResponse |
Report a command run's result
POST /space/{space_id}/channel/{channel_id}/command_run/{command_run_id}/result
Reported by the Channel's client once it has executed the run: Completed with a Result, or Failed or Rejected with an ErrorMessage. A run already terminal is returned unchanged.
Operation ID: ReportCommandRunResult
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
space_id |
string | ✓ | Unique identifier for a space_id |
channel_id |
string | ✓ | Unique identifier for a channel_id |
command_run_id |
string | ✓ | Unique identifier for a command_run_id |
Request Body
Content-Type: application/json
Schema: CommandRunResult
Responses
| Status | Description | Content-Type | Schema |
|---|---|---|---|
| 200 | CommandRun is one execution of a command on a Channel: the request, from the caller, and the outcome, from the channel's client. Create one at the Space, naming the command and optionally the Channel; without a Channel, the command is resolved to the one Channel in the Space that declares it. A Pending run waits for the client until its Deadline; a Delivered run has a fixed time to its outcome. | application/json |
CommandRun |
| 400 | CommandRun request is invalid (Bad Request). | application/json |
StandardErrorResponse |
| 401 | Unauthorized access. | application/json |
StandardErrorResponse |
| 403 | Forbidden access. | application/json |
StandardErrorResponse |
| 404 | CommandRun not found. | application/json |
StandardErrorResponse |
| 409 | CommandRun data conflict. Data has changed since last read. | application/json |
StandardErrorResponse |
| 500 | Something went wrong while processing CommandRun. | application/json |
StandardErrorResponse |
| default | Unexpected error. | application/json |
StandardErrorResponse |
Run a command on a Channel
POST /space/{space_id}/command_run
Creates a run of the command on a Channel of the Space: the one named by ChannelID, or else the one Channel in the Space that declares the command. Running a command takes Use on the Channel. The run is returned Pending; read it back with GET, with ?wait=
Operation ID: CreateCommandRun
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
space_id |
string | ✓ | Unique identifier for a space_id |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dry_run |
boolean | If true, report what the write would do without doing it: the write runs, including every check it makes, and is then rolled back. The response is the one the write would return, with the entities as they would be written. An entity a dry run creates is given an ID that the real create will not reuse. |
Request Body
Content-Type: application/json
Schema: CommandRun
Responses
| Status | Description | Content-Type | Schema |
|---|---|---|---|
| 200 | CommandRun is one execution of a command on a Channel: the request, from the caller, and the outcome, from the channel's client. Create one at the Space, naming the command and optionally the Channel; without a Channel, the command is resolved to the one Channel in the Space that declares it. A Pending run waits for the client until its Deadline; a Delivered run has a fixed time to its outcome. | application/json |
CommandRun |
| 400 | CommandRun request is invalid (Bad Request). | application/json |
StandardErrorResponse |
| 401 | Unauthorized access. | application/json |
StandardErrorResponse |
| 403 | Forbidden access. | application/json |
StandardErrorResponse |
| 404 | CommandRun not found. | application/json |
StandardErrorResponse |
| 409 | Several Channels in the Space declare the command; name one with ChannelID. | application/json |
StandardErrorResponse |
| 500 | Something went wrong while processing CommandRun. | application/json |
StandardErrorResponse |
| default | Unexpected error. | application/json |
StandardErrorResponse |
Cancel a Pending command run
POST /space/{space_id}/command_run/{command_run_id}/cancel
Marks a Pending run Canceled. A run that has been delivered cannot be canceled; it completes or times out.
Operation ID: CancelCommandRun
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
space_id |
string | ✓ | Unique identifier for a space_id |
command_run_id |
string | ✓ | Unique identifier for a command_run_id |
Responses
| Status | Description | Content-Type | Schema |
|---|---|---|---|
| 200 | CommandRun is one execution of a command on a Channel: the request, from the caller, and the outcome, from the channel's client. Create one at the Space, naming the command and optionally the Channel; without a Channel, the command is resolved to the one Channel in the Space that declares it. A Pending run waits for the client until its Deadline; a Delivered run has a fixed time to its outcome. | application/json |
CommandRun |
| 400 | CommandRun request is invalid (Bad Request). | application/json |
StandardErrorResponse |
| 401 | Unauthorized access. | application/json |
StandardErrorResponse |
| 403 | Forbidden access. | application/json |
StandardErrorResponse |
| 404 | CommandRun not found. | application/json |
StandardErrorResponse |
| 409 | The run is not Pending. | application/json |
StandardErrorResponse |
| 500 | Something went wrong while processing CommandRun. | application/json |
StandardErrorResponse |
| default | Unexpected error. | application/json |
StandardErrorResponse |
Schemas
CommandRun
CommandRun is one execution of a command on a Channel: the request, from the caller, and the outcome, from the channel's client. Create one at the Space, naming the command and optionally the Channel; without a Channel, the command is resolved to the one Channel in the Space that declares it. A Pending run waits for the client until its Deadline; a Delivered run has a fixed time to its outcome.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
ChannelID |
string (uuid) | ChannelID is the Channel the run is delivered on. Optional on create: absent, the command is resolved within the Space. | |
Command |
string | ✓ | Command is the name of the command to run, as the Channel declares it. |
CommandRunID |
string (uuid) | CommandRunID uniquely identifies the run. | |
CompletedAt |
string (date-time) | CompletedAt is when the run reached a terminal status. | |
CreatedAt |
string (date-time) | When the run was created, in "2023-01-01T12:00:00Z" format. | |
CreatedBy |
string (uuid) | CreatedBy is the user that asked for the run. | |
Deadline |
string (date-time) | Deadline is when a Pending run expires. Defaults to five minutes after creation; at most one hour. | |
DeliveredAt |
string (date-time) | DeliveredAt is when the run was handed to the client. | |
ErrorMessage |
string | ErrorMessage explains a Failed or Rejected run. | |
OrganizationID |
string (uuid) | OrganizationID of the Space the run is in. | |
Params |
object | Params is the JSON object of inputs, keyed by the option names the Channel declares for the command. | |
Result |
object | Result is the JSON the client reported for a Completed run. | |
SpaceID |
string (uuid) | SpaceID of the Space the run is in: the Channel's Space. | |
SpaceSlug |
string | Slug of the Space the run is in. | |
Status |
string | Status is where the run is: Pending, Delivered, Completed, Failed, Rejected, Canceled, Expired or TimedOut. | |
TargetID |
string (uuid) | TargetID is the Target the run is about, if any. For the record; not a foreign key. | |
TimeoutAt |
string (date-time) | TimeoutAt is when a Delivered run times out if the client has reported nothing. | |
UnitID |
string (uuid) | UnitID is the Unit the run is about, if any. For the record; not a foreign key. | |
Version |
integer (int64) | An entity-specific sequence number used for optimistic concurrency control. |
CommandRunResult
CommandRunResult is what a Channel's client reports for a run it executed: Completed with a Result, or Failed or Rejected with an ErrorMessage.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
ErrorMessage |
string | ||
Result |
object | ||
Status |
string | ✓ | Completed, Failed or Rejected. |
StandardErrorResponse
The body of an error response: the error as data (Error), and as one string (message) for clients written before Error.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
Error |
The error: its message, category (Type), HTTP status, details, and structured items. | ||
message |
string | The error as one string: its message, with any details, items, and individual errors appended. Kept for clients written before Error; new clients read Error. |