Yamcs HTTP API
- 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
- Server
- Services
- Sessions
- Stream Archive
- Table
- Time Correlation
- Time
- Timeline
Related
Yamcs Release Notes
Yamcs Server Manual
Source Code Documentation
Download this Document
Create ItemΒΆ
Create an item
URI Template
POST /api/timeline/{instance}/items
{instance}
Yamcs instance name
Request Body
interface CreateItemRequest {
// Item source
source: string;
// Item name
name: string;
// Item type
type: TimelineItemType;
// Item start. The fields ``start`` and ``relativeTime``
// are mutually exclusive
start: string; // RFC 3339 timestamp
// Item duration. Applies also if ``relativeTime`` is specified
duration: string; // Duration in seconds. Example: "3s" or "3.001s"
// Tags
tags: string[];
// If this item is part of a group, this is the group identifier
groupId: string;
// If the item time specification is relative to another item,
// ``relativeTime`` contains a reference to that item, as well
// as the relative start (the duration is the same as given by the
// ``duration`` field).
relativeTime: RelativeTime;
// Item description
description: string;
// Additional properties used by yamcs-web to render this item
properties: {[key: string]: string};
// Activity definition associated to this item.
// Required if ``type`` is ACTIVITY.
activityDefinition: ActivityDefinitionInfo;
}
Response Type
interface TimelineItem {
// Item identifier.
//
// The identifier is set and recognized by the source.
// It is possible but unlikely that two items coming from two different sources will have the same id.
//
// The rdb source sets the id to a UUID.
// The commands source sets the id to the command id
id: string;
// Item name
name: string;
type: TimelineItemType;
start: string; // RFC 3339 timestamp
duration: string; // Duration in seconds. Example: "3s" or "3.001s"
tags: string[];
// If this item is part of a group, this is the group identifier
groupId: string;
// If this item time specification is relative to another item, ``relativeTime``
// contains a reference to that item as well as the relative start (the duration
// is the same as the ``duration`` field).
//
// Note that start of the item is computed by the server based on the
// ``relativeTime`` before sending the item to the client.
relativeTime: RelativeTime;
// Item description
description: string;
// Additional properties used by yamcs-web to render this item
properties: {[key: string]: string};
// For activities: execution status
status: ExecutionStatus;
// For activities: if the status is FAILED or ABORTED, this may indicate the reason
// some information may also be available in the item log
failureReason: string;
// Activity definition associated to this item.
// Set if ``type`` is ACTIVITY.
activityDefinition: ActivityDefinitionInfo;
// Identifiers of activity runs matching this item.
// Set if ``type`` is ACTIVITY.
runs: string[];
}
Related Types
interface RelativeTime {
// Identifier of the item that this time is relative to.
relto: string;
relativeStart: string; // Duration in seconds. Example: "3s" or "3.001s"
}
interface ActivityDefinitionInfo {
// Activity type.
// Common types: MANUAL, SCRIPT, COMMAND, COMMAND_STACK
type: string;
// Activity arguments. The expected arguments
// are different for each activity type
args: {[key: string]: any};
// Optional comment
comment: string;
}
enum TimelineItemType {
// Events are the most generic timeline item.
EVENT = "EVENT",
// Unlike events, activities have an execution status
ACTIVITY = "ACTIVITY",
// A grouping of other items (events and/or activities)
ITEM_GROUP = "ITEM_GROUP",
// A grouping of activities. The group is itself an activity
ACTIVITY_GROUP = "ACTIVITY_GROUP",
}
enum ExecutionStatus {
PLANNED = "PLANNED",
IN_PROGRESS = "IN_PROGRESS",
COMPLETED = "COMPLETED",
ABORTED = "ABORTED",
FAILED = "FAILED",
}