Methods
- Activities
- Alarms
- Audit
- Buckets
- Clearance
- Commands
- COP-1
- Database
- Events
- File Transfer
- IAM
- Indexes
- Instances
- Links
- MDB Override
- MDB
- Packets
- Parameter Archive
- Parameter Lists
- Parameter Values
- Processing
- Queues
- Replication
- RocksDB
- SDLS
- Server
- Services
- Sessions
- Table
- Time Correlation
- Time
- Timeline
Yamcs Release Notes
Yamcs Server Manual
Source Code Documentation
Start ActivityΒΆ
Start an activity
The request body allows for the execution of arbitrary activities.
Key |
Value |
|---|---|
|
Activity type |
|
Map accepting type-specific options |
The following activity types are included in the core Yamcs module:
COMMAND: Execute a single commandArgs:
command(string): Required. Qualified name of a commandargs(map): Named arguments, if the command requires anyextra(map): Extra command optionsprocessor(string): Processor name. If not provided, Yamcs defaults to any processor it can find with commanding enabled.
Example:
{ "type": "COMMAND", "args": { "command": "/YSS/SIMULATOR/SWITCH_VOLTAGE_ON", "args": { "voltage_num": 3 }, "processor": "realtime" } }
STACK: Execute a stackArgs:
bucket(string): Required. The name of the bucket containg the stackstack(string): Required. The name of the stack object inside the bucketprocessor(string): Processor name. If not provided, Yamcs defaults to any processor it can find with commanding enabled.
Example:
{ "type": "STACK", "args": { "bucket": "mybucket", "stack": "mystack.ycs", "processor": "realtime" } }
SCRIPT: Run a scriptArgs:
script(string): Required. Script identifier. This should be the relative path to an executable file in one of the search locations. When unconfigured, the default search location isetc/scripts/relative to the Yamcs working directory.args(string or string[]): Script argumentsprocessor(string): If provided, this information is passed to the script in an environment variableYAMCS_PROCESSOR.runner(string): In case of multiple script runners, you can provide this field, to indicate which runner this script execution applies to.
Example:
{ "type": "SCRIPT", "args": { "script": "simulate_los.py", "args": "--duration 60", "processor": "realtime" } }
URI Template
POST /api/activities/{instance}/activities
{instance}Yamcs instance name
Request Body
interface ActivityDefinitionInfo {
// Activity type.
// Common types: MANUAL, SCRIPT, COMMAND, STACK
type: string;
// Activity arguments. The expected arguments
// are different for each activity type
args: {[key: string]: any};
// Optional label.
//
// Keep short. Used in Yamcs Timeline charts.
label: string;
// Human-readable description of the essence of this activity.
// For example, for a script this would be the name of the script.
//
// This is an output field only.
description: string;
}
Response Type
interface ActivityInfo {
// Activity identifier
id: string;
// Start time of the activity
start: string; // RFC 3339 timestamp
// Differentiator in case of multiple activities
// with the same start time
seq: number;
// Activity status
status: ActivityStatus;
// User who started the run
startedBy: string;
// Activity type
type: string;
// Activity arguments
args: {[key: string]: any};
// Label for display in Yamcs Timeline charts
label: string;
// Activity detail (short descriptive)
detail: string;
// Stop time of the activity run
stop: string; // RFC 3339 timestamp
// User who stopped the run. Only set if the activity
// was manually stopped
stoppedBy: string;
// If set, the activity is stopped, but failed
failureReason: string;
}
Related Types
enum ActivityStatus {
// An activity is runing
RUNNING = "RUNNING",
// The activity was cancelled. It may or may not still be running
// (verify stop time).
CANCELLED = "CANCELLED",
// The activity completed successfully
SUCCESSFUL = "SUCCESSFUL",
// An error occurred while running this activity
FAILED = "FAILED",
}