/  Yamcs HTTP API  /  Timeline  /  List Items

List ItemsΒΆ

List items

URI Template

GET /api/timeline/{instance}/items
{instance}

Yamcs instance name

Query Parameters

source

Item source

limit
next

Continuation token returned by a previous page response.

start
stop
band

Use the band defined source and filter

filters

If the band is not specified, these filters and the source above will be used

details

If true, send the items with full details If false, some details like the description will be omited from the listed items

Response Type

interface ListItemsResponse {

  //item source
  source: string;

  //items
  items: TimelineItem[];

  // Token indicating the response is only partial. More results can then
  // be obtained by performing the same request (including all original
  // query parameters) and setting the ``next`` parameter to this token.
  continuationToken: string;
}

Related Types

// An item matches the filter if it matches any of the criteria from the list.
// If the list is empty, the filter will not match.
interface ItemFilter {
  criteria: FilterCriterion[];
}

// Available filter criteria depend on the item's source.
//
// When the source is rdb:
//
// tag
//   An item matches if the value property is among its tags.
//
// When the source is commands:
//
// cmdNamePattern:
//   value is considered as a regexp and matched against the ``cmdName``
//   column from the ``cmdhist`` table.
interface FilterCriterion {
  key: string;
  value: string;
}

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[];
}

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",
}