/  Yamcs HTTP API  /  Timeline  /  Update Item

Update ItemΒΆ

Update an item

URI Template

PUT /api/timeline/{instance}/items/{id}
{instance}

Yamcs instance name

{id}

Item identifier

Request Body

interface UpdateItemRequest {

  // Item source
  source: string;

  // Item name
  name: string;

  //new start time
  start: string;  // RFC 3339 timestamp

  //new duration
  duration: string; // Duration in seconds. Example: "3s" or "3.001s"

  //new tags
  tags: string[];

  // Set this to true to remove completely all the tags
  // (required because in the protobuf we cannot distinguish between an empty tags list and a non existent list)
  clearTags: boolean;

  //new group identifier.
  //to keep the old value, leave out
  // to clear the group, set to an empty string
  groupId: string;

  //new relative time
  // to keep the old value, leave out the property
  // to clear, set the start
  relativeTime: RelativeTime;

  //new status (valid for activities)
  status: ExecutionStatus;

  //failure reason (valid for activities)
  failureReason: string;

  // Additional properties used by yamcs-web to render this item
  properties: {[key: string]: string};

  // Set this to true to remove completely all properties
  clearProperties: boolean;
}

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 given by the duration above)
  //note that start of the item will be 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 ExecutionStatus {
  PLANNED = "PLANNED",
  IN_PROGRESS = "IN_PROGRESS",
  COMPLETED = "COMPLETED",
  ABORTED = "ABORTED",
  FAILED = "FAILED",
}

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