Docs / Yamcs HTTP API / Commanding / Issue Command

Issue Command

Issue a new command of the given type:

POST /api/processors/:instance/:processor/commands/:namespace/:name

After validating the input parameters, the command will be added to the appropriate command queue for further dispatch.

Parameters

Name Type Description
origin string The origin of the command. Typically in "user@host" format.
sequenceNumber integer The sequence number as specified by the origin. This gets communicated back in command history and command queue entries, thereby allowing clients to map local with remote command identities.
dryRun bool Whether a response will be returned without actually issuing the command. This is useful when debugging commands. Default no
assignment array of
string pairs
The name/value assignments for this command.
comment string Comment attached to this command.

Example

{
  "sequenceNumber" : 1,
  "origin" : "user@my-machine",
  "assignment" : [ {
    "name": "voltage_num",
    "value": "3"
  } ],
  "dryRun" : true
}

Response

Status: 200 OK
{
  "queue" : "default",
  "source" : "SWITCH_VOLTAGE_ON(voltage_num: 3)",
  "hex" : "1864C000000000000000006A0000000103",
  "binary" : "GGTAAAAAAAAAAABqAAAAAQM="
}

The binary is encoded in Base64 format.

Alternative Media Types

Protobuf

Use these HTTP headers:

Content-Type: application/protobuf
Accept: application/protobuf

Request is of type:

rest/rest.proto 
message IssueCommandRequest {
  message Assignment {
    optional string name = 1;
    optional string value = 2;
  }
  repeated Assignment assignment = 1;
  optional string origin = 2;
  optional int32 sequenceNumber = 3;
  optional bool dryRun = 4;
}

Response

rest/rest.proto 
message IssueCommandResponse {
  optional string queue = 1;
  optional string source = 2;
  optional string hex = 3;
  optional bytes binary = 4;
}