/  Yamcs HTTP API  /  Parameter Archive  /  Get Parameter Samples

Get Parameter SamplesΒΆ

Get parameter samples

This divides the query interval in a number of intervals and returns aggregated statistics (max, min, avg) about each interval.

This operation is useful when making high-level overviews (such as plots) of a parameter's value over large time intervals without having to retrieve each and every individual parameter value.

By default this operation fetches data from the parameter archive and/or parameter cache. If these services are not configured, you can still get correct results by specifying the option source=replay as detailed below.

URI Template

GET /api/archive/{instance}/parameters/{name*}/samples
{instance}

Yamcs instance name

{name*}

Parameter name

Query Parameters

start

Filter the lower bound of the parameter's generation time. Specify a date string in ISO 8601 format.

stop

Filter the upper bound of the parameter's generation time. Specify a date string in ISO 8601 format.

count

Number of intervals to use. Default: 500.

norealtime

Disable loading of parameters from the parameter cache. Default: false.

useRawValue

Consider the raw value instead of the engineering value. Default is to use the engineering value

gapTime

Milliseconds before a sample is considered expired. This property is used as a fallback, when the underlying parameter values have no implicit expiration time.

Default: 120000.

processor

The name of the processor from which to use the parameter cache. Default: realtime.

source

Specifies how to retrieve the parameters. Either ParameterArchive or replay. If replay is specified, a replay processor will be created and data will be processed with the active Mission Database. Note that this is much slower than receiving data from the ParameterArchive.

Default: ParameterArchive.

Response Type

interface TimeSeries {

  // List of samples.
  sample: Sample[];
}

Related Types

interface Sample {

  // Start time of the sample interval.
  time: string;  // RFC 3339 timestamp

  // Average numeric value during the sample interval.
  avg: number;

  // Minimum numeric value during the sample interval.
  min: number;

  // Maximum numeric value during the sample interval.
  max: number;

  // Number of samples during the sample interval.
  // If this value is zero, it indicates a gap.
  n: number;

  // Generation time of the ``min`` value.
  minTime: string;  // RFC 3339 timestamp

  // Generation time of the ``max`` value.
  maxTime: string;  // RFC 3339 timestamp
}