Docs / Yamcs HTTP API / Parameter Values / Get Parameter Samples

Get Parameter Samples

Sample the history of values for the specified parameter:

GET /api/archive/:instance/parameters/:namespace/:name/samples   

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.

Parameters

Name Type Description
start string Filter the lower bound of the parameter's generation time. Specify a date string in ISO 8601 format
stop string Filter the upper bound of the parameter's generation time. Specify a date string in ISO 8601 format
count int Number of returned samples. Default: 500
order string The order of the returned results. Can be either asc or desc. Default: asc
norealtime boolean Disable loading of parameters from the parameter cache. Default: false
processor string The name of the processor from which to use the parameter cache. Default: realtime
source string 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 XTCEDB. Note that this is much slower than receiving data from the ParameterArchive.
Default: ParameterArchive

Response

Status: 200 OK
{
  "sample" : [ {
    "time" : "2015-11-11T09:11:37.626",
    "avg" : 169.41836734693865,
    "min" : 103.0,
    "max" : 237.0,
    "n" : 98
  } ]
}

Alternative Media Types

Protobuf

Use HTTP header:

Accept: application/protobuf

Response is of type:

pvalue/pvalue.proto 
message TimeSeries {
  message Sample {
    optional string time = 1;
    optional double avg = 2;
    optional double min = 3;
    optional double max = 4;
    optional int32 n = 5;
  }

  repeated Sample sample = 1;
}