http://ADDRESS:PORT/slowplot.html?OPTIONS
http://ADDRESS:PORT/slowplot.html?channel=CHANNELS&OPTIONS
,
without
spaces.;
./
. Default
is “timeseries”.channel=ch0,ch1;log/table
.http://ADDRESS:PORT/slowplot.html?config=CONFIG_FILE&OPTIONS
channel=CAHNNEL_LIST
config=CONFIG_FILE
to=TIME
(in UNIX time or ISO format, default: current
time)length=LENGTH
(default: 900)reload=RELOAD
(default: 300)grid=GRID
(default: 2x1)http://ADDRESS:PORT/slowdash.html?config=CONFIG_FILE&OPTIONS
config=CONFIG_FILE
time=TIME
(in UNIX time or ISO format, default: current
time)length=LENGTH
(default: 3600)reload=RELOAD
(default: 300)http://ADDRESS:PORT/slowcruise.html?config=CONFIG_FILE&OPTIONS
config=CONFIG_FILE
interval=INTERVAL
(default: 60)GET http://ADDRESS:PORT/api/ping
"pong"
GET http://ADDRESS:PORT/api/echo/PATH?OPTIONS
{
"URL": "echo/PATH?OPTIONS",
"Path": [ PATH_ELEMENTS ],
"Opts": { OPTION_ELEMENTS }
}
GET http://ADDRESS:PORT/api/config
{
"project": {
"name": "ATDS",
"title": "Atomic Tritium Demonstrator at UW (ATDS)"
},
"style": {
"theme": "light"
},
"contents": {
"slowdash": [
{
"name": "ATDS",
"mtime": 1677724206.5829866,
"title": "",
"description": "Atomic Tritium Demonstrator at UW Top Level",
"config_file": "slowdash-ATDS.json"
}
],
"slowplot": [
{
"name": "RTD_ACC",
"mtime": 1678019620.6981564,
"title": "Accomodator RTDs",
"description": "Accomodator RTDs",
"config_file": "slowplot-RTD_ACC.json"
},
{
"name": "ATDS",
"mtime": 1677726950.1148098,
"title": "ATDS Overview",
"description": "ATDS Standard Plots",
"config_file": "slowplot-ATDS.json"
}
],
"slowcruise": [
{
"name": "AllPlots",
"mtime": 1678019441.923559,
"title": "ATDS All Plots",
"description": "Loop over all Dashboards and Plots",
"config_file": "slowcruise-AllPlots.yaml"
}
],
"alarms": [
{
"name": "normal",
"mtime": 1630663955.5648437,
"title": "",
"description": "",
"config_file": "alarms-normal.yaml"
}
]
}
}
GET http://ADDRESS:PORT/api/channels
[
{ "name": CH0_NAME, "type": CH0_TYPE },
...
]
GET http://ADDRESS:PORT/api/data/CHANNEL_LIST?OPTIONS
channel list is:
CH0,CH1,CH2...
options are:
length=LENGTH [default 3600]
to=TO [default 0 (now)]
resample=RESAMPLE [default -1 (no resampling), 0 for auto]
reducer=REDUCER [default "last"]
For details see the Data Model section.
GET http://ADDRESS:PORT/api/blob/CHANNEL?id=ID
GET http://ADDRESS:PORT/api/config/contentlist
This returns the content of the configuration entry. If the file is YAML, it is converted into JSON. If the file is a Python script, the reply content will be dynamically generated.
GET http://ADDRESS:PORT/api/config/content/FILENAME
GET http://ADDRESS:PORT/api/config/filelist
This returns the raw content of the file
GET http://ADDRESS:PORT/api/config/file/FILENAME
_
_
, -
,
.
, ,
, :
, [
and
]
.json
, .yaml
,
.html
, .png
, .jpg
,
.jpeg
, .svg
, .csv
POST http://ADDRESS:PORT/api/config/file/NAME?OPTIONS
[ with JSON text as contents ]
.
, _
and -
.slowdash-
, slowplot-
, or
slowcruise-
..json
or .yaml
.config
sub-directory of the
user project directory.overwrite=yes
,
fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json; charset=utf-8' },
body: JSON.stringify(doc, null, 2)
}).then(response => {
if (response.status == 202) {
// file already exists. retry with overwrite=yes to overwrite
return;
}if (! response.ok) {
throw new Error(response.status + " " + response.statusText);
}//// success ////
....
}).catch(e => {
//// error ////
....
; })
POST http://ADDRESS:PORT/api/control
[ with JSON text as contents ]
{"status": ...; "message": ...}
), it will be returned.{"status": "ok"}
on success, or
{"status": "error"}
on error.A typical JavaScript would look like:
fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json; charset=utf-8' },
body: JSON.stringify(doc, null, 2)
}).then(response => {
if (! response.ok) {
throw new Error(response.status + " " + response.statusText);
}return response.json();
}).then(doc => {
if ((doc.status ?? '').toUpperCase() == 'ERROR') {
throw new Error(doc.message ?? '');
}//// success ////
....
}).catch(e => {
//// error ////
....
; })