/  Yamcs HTTP API  /  Table  /  Read Rows

Read RowsΒΆ

Streams back the contents of all rows in key order

The ColumnInfo message assigns an integer id for each column and the id is present in each cell belonging to that column (this is done in order to avoid sending the ColumnInfo with each Cell). The column id starts from 0 and are incremented with each new column found. The ids are only valid during one single dump. The dumped data does not contain information on any table characteristics such as (primary) key, partitioning or other storage options.

Warning

This method uses server-streaming. Yamcs sends an unspecified amount of data using chunked transfer encoding.

URI Template

POST /api/archive/{instance}/tables/{table}:readRows
{instance}

Yamcs instance name.

{table}

Table name.

Request Body

interface ReadRowsRequest {

  // The columns to be included in the result. If unspecified, all
  // table and/or additional tuple columns will be included.
  cols: string[];

  // Limit the results by specifying a SQL WHERE clause.
  //
  // Examples:
  // - pname = '/YSS/SIMULATOR/FlightData'
  // - gentime > '2023-01-01T00:00:00.000Z'
  // - pname = '/YSS/SIMULATOR/FlightData' and gentime > '2023-01-01T00:00:00.000Z'
  query: string;
}

Response Type

interface Row {

  //the column info is only present for new columns in a stream of Row messages
  columns: ColumnInfo[];
  cells: Cell[];
}

Related Types

interface ColumnInfo {
  id: number;
  name: string;
  type: string;

  // The name of the class implementing the proto object if dataType is PROTOBUF
  protoClass: string;
}

interface Cell {
  columnId: number;
  data: string;  // Base64
}