/v1/targets/{target}/valuesCurrent values#
Current values of a target
The latest sample of every measure and derived measure of the target, from the current value table (stellar_values).
Path parameters
targetrequiredstring
Target, as named in the topology (sim-1).
Responses
200Current values, by key order.application/json
valuesrequiredarray of CurrentValue
Current values, by key order.
CurrentValue · 4 fields
componentrequiredstring
Component.
instancestring
Instance of a multi-instance component.
measurerequiredstring
Measure or derived measure.
samplerequiredLatest sample.
Sample · 6 fields
deliveryrequiredstring
realtime or deferred; deferred when any input of a derived measure is.
ground_time requiredstring
Ground reception time, reference of freshness; for a derived measure, that of its oldest input.
linkrequiredstring
Link of the frame; for a derived measure, that of its most recent input.
rawany
Raw value of a measure calibrated by the MCS.
timerequiredstring
Time of the sample: on-board time when known, else ground reception time; for a derived measure, that of its most recent input.
valuerequiredany
Physical value: number in the unit of the measure, boolean, enum value, hexadecimal bytes;
null when a temporal derived measure becomes unknown (empty window).
404Invalid target.application/json
errorsrequiredarray of ErrorItem
Every error found.
ErrorItem · 3 fields
coderequiredstring
Stable code.
messagerequiredstring
Message for the operator.
helpstring
Suggested fix.
503The MCS bus (NATS) is unavailable: api::unavailable.application/json
errorsrequiredarray of ErrorItem
Every error found.
ErrorItem · 3 fields
coderequiredstring
Stable code.
messagerequiredstring
Message for the operator.
helpstring
Suggested fix.
Request
curl "http://localhost:8080/v1/targets/<target>/values"import requests
BASE_URL = "http://localhost:8080"
target = "<target>" # Target, as named in the topology (`sim-1`).
response = requests.get(f"{BASE_URL}/v1/targets/{target}/values")
response.raise_for_status()
print(response.json())let base_url = "http://localhost:8080";
let target = "<target>"; // Target, as named in the topology (`sim-1`).
let response = reqwest::Client::new()
.get(format!("{base_url}/v1/targets/{target}/values"))
.send()
.await?
.error_for_status()?;
let body: serde_json::Value = response.json().await?;
println!("{body:#}");Response
{
"values": [
{
"component": "string",
"instance": "string",
"measure": "string",
"sample": {
"delivery": "string",
"ground_time": "string",
"link": "string",
"raw": null,
"time": "string",
"value": null
}
}
]
}{
"errors": [
{
"code": "string",
"message": "string",
"help": "string"
}
]
}{
"errors": [
{
"code": "string",
"message": "string",
"help": "string"
}
]
}/v1/targets/{target}/values/watchWatch values#
Watch the values of a target (WebSocket)
Sends the current values, then every update of the table. A measure is selected as tcu[TCU1].responding (one instance), tcu.responding (every instance) or responding (any component).
Path parameters
targetrequiredstring
Target, as named in the topology (sim-1).
Query parameters
measuresstring
Comma-separated measures; every measure without.
Responses
101WebSocket: one CurrentValue per message.application/json
componentrequiredstring
Component.
instancestring
Instance of a multi-instance component.
measurerequiredstring
Measure or derived measure.
samplerequiredLatest sample.
Sample · 6 fields
deliveryrequiredstring
realtime or deferred; deferred when any input of a derived measure is.
ground_time requiredstring
Ground reception time, reference of freshness; for a derived measure, that of its oldest input.
linkrequiredstring
Link of the frame; for a derived measure, that of its most recent input.
rawany
Raw value of a measure calibrated by the MCS.
timerequiredstring
Time of the sample: on-board time when known, else ground reception time; for a derived measure, that of its most recent input.
valuerequiredany
Physical value: number in the unit of the measure, boolean, enum value, hexadecimal bytes;
null when a temporal derived measure becomes unknown (empty window).
400Invalid measure selector: api::invalid-measure.application/json
errorsrequiredarray of ErrorItem
Every error found.
ErrorItem · 3 fields
coderequiredstring
Stable code.
messagerequiredstring
Message for the operator.
helpstring
Suggested fix.
404Invalid target.application/json
errorsrequiredarray of ErrorItem
Every error found.
ErrorItem · 3 fields
coderequiredstring
Stable code.
messagerequiredstring
Message for the operator.
helpstring
Suggested fix.
503The MCS bus (NATS) is unavailable: api::unavailable.application/json
errorsrequiredarray of ErrorItem
Every error found.
ErrorItem · 3 fields
coderequiredstring
Stable code.
messagerequiredstring
Message for the operator.
helpstring
Suggested fix.
Request
curl "http://localhost:8080/v1/targets/<target>/values/watch"import requests
BASE_URL = "http://localhost:8080"
target = "<target>" # Target, as named in the topology (`sim-1`).
response = requests.get(f"{BASE_URL}/v1/targets/{target}/values/watch")
response.raise_for_status()let base_url = "http://localhost:8080";
let target = "<target>"; // Target, as named in the topology (`sim-1`).
let response = reqwest::Client::new()
.get(format!("{base_url}/v1/targets/{target}/values/watch"))
.send()
.await?
.error_for_status()?;Response
{
"component": "string",
"instance": "string",
"measure": "string",
"sample": {
"delivery": "string",
"ground_time": "string",
"link": "string",
"raw": null,
"time": "string",
"value": null
}
}{
"errors": [
{
"code": "string",
"message": "string",
"help": "string"
}
]
}{
"errors": [
{
"code": "string",
"message": "string",
"help": "string"
}
]
}{
"errors": [
{
"code": "string",
"message": "string",
"help": "string"
}
]
}/v1/targets/{target}/values/historyValue history#
History of a measure
The samples of one measure or derived measure of the target over a window, as the compute stage published them. Beyond limit samples in the window, one in every few is kept (thinned), the last one always.
Path parameters
targetrequiredstring
Target, as named in the topology (sim-1).
Query parameters
measurerequiredstring
The measure: tcu[TCU1].anode_voltage, or psu.voltage for a component without instances.
fromstring
Start of the window (RFC 3339); 10 min before to by default.
tostring
End of the window (RFC 3339); now by default.
limitinteger
Samples returned at most: 2000 by default, 20000 at most.
Responses
200The samples of the window.application/json
componentrequiredstring
Component.
instancestring
Instance of a multi-instance component.
measurerequiredstring
Measure or derived measure.
samplesrequiredarray of Sample
Samples in the order they were published: real-time ones by time, deferred ones when
they came down. With more than limit in the window, one in every few is kept, the
last one always.
Sample · 6 fields
deliveryrequiredstring
realtime or deferred; deferred when any input of a derived measure is.
ground_time requiredstring
Ground reception time, reference of freshness; for a derived measure, that of its oldest input.
linkrequiredstring
Link of the frame; for a derived measure, that of its most recent input.
rawany
Raw value of a measure calibrated by the MCS.
timerequiredstring
Time of the sample: on-board time when known, else ground reception time; for a derived measure, that of its most recent input.
valuerequiredany
Physical value: number in the unit of the measure, boolean, enum value, hexadecimal bytes;
null when a temporal derived measure becomes unknown (empty window).
thinnedrequiredboolean
Whether samples were left out to keep limit.
truncatedrequiredboolean
Whether the window holds more samples than are read at once: only its start is read.
400Invalid measure or query: api::invalid-measure, api::invalid-query.application/json
errorsrequiredarray of ErrorItem
Every error found.
ErrorItem · 3 fields
coderequiredstring
Stable code.
messagerequiredstring
Message for the operator.
helpstring
Suggested fix.
404Invalid target.application/json
errorsrequiredarray of ErrorItem
Every error found.
ErrorItem · 3 fields
coderequiredstring
Stable code.
messagerequiredstring
Message for the operator.
helpstring
Suggested fix.
503The MCS bus (NATS) is unavailable: api::unavailable.application/json
errorsrequiredarray of ErrorItem
Every error found.
ErrorItem · 3 fields
coderequiredstring
Stable code.
messagerequiredstring
Message for the operator.
helpstring
Suggested fix.
Request
curl "http://localhost:8080/v1/targets/<target>/values/history?measure=tcu[TCU1].anode_voltage"import requests
BASE_URL = "http://localhost:8080"
target = "<target>" # Target, as named in the topology (`sim-1`).
response = requests.get(
f"{BASE_URL}/v1/targets/{target}/values/history",
params={"measure": "tcu[TCU1].anode_voltage"},
)
response.raise_for_status()
print(response.json())let base_url = "http://localhost:8080";
let target = "<target>"; // Target, as named in the topology (`sim-1`).
let response = reqwest::Client::new()
.get(format!("{base_url}/v1/targets/{target}/values/history"))
.query(&[("measure", "tcu[TCU1].anode_voltage")])
.send()
.await?
.error_for_status()?;
let body: serde_json::Value = response.json().await?;
println!("{body:#}");Response
{
"component": "string",
"instance": "string",
"measure": "string",
"samples": [
{
"delivery": "string",
"ground_time": "string",
"link": "string",
"raw": null,
"time": "string",
"value": null
}
],
"thinned": true,
"truncated": true
}{
"errors": [
{
"code": "string",
"message": "string",
"help": "string"
}
]
}{
"errors": [
{
"code": "string",
"message": "string",
"help": "string"
}
]
}{
"errors": [
{
"code": "string",
"message": "string",
"help": "string"
}
]
}