Retrieval Documentation

HTTP API documentation

This API follows the common convention that the addition of a key to a json object is not considered a breaking change.

Currently available:

Query binned data

Method: GET

URL: https://data-api.psi.ch/api/4/binned

Query parameters:

Request header: "Accept" must be "application/json"

CURL example:

curl -H 'Accept: application/json' 'http://sf-daqbuf-21:8380/api/4/binned?channel_backend=sf-databuffer
  &channel_name=SLAAR-LSCP4-LAS6891:CH7:1&beg_date=2021-05-25T00:00:00.000Z&end_date=2021-05-26T00:00:00.000Z&bin_count=3'

Partial result

Note the keys continue_at and missing_bins.

{
  "continue_at": "2021-05-25T16:00:00.000Z",
  "missing_bins": 2,
  "avgs": [
    340.87640380859375,
    340.7442321777344,
    340.58685302734375,
    341.04608154296875
  ],
  "counts": [
    143076,
    143077,
    143076,
    143076
  ],
  "maxs": [
    452,
    452,
    459,
    458
  ],
  "mins": [
    231,
    240,
    239,
    239
  ],
  "ts_bin_edges": [
    "2021-05-25T00:00:00.000Z",
    "2021-05-25T04:00:00.000Z",
    "2021-05-25T08:00:00.000Z",
    "2021-05-25T12:00:00.000Z",
    "2021-05-25T16:00:00.000Z"
  ]
}

Complete result

A complete result will not have a continue_at key.

Finalised range

If the server can determine that no more data will be added to the requested time range then it will add the flag finalised_range to the response.

Feedback and comments very much appreciated!

dominik.werder@psi.ch

or please assign me a JIRA ticket.