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: http://sf-daqbuf-21:8380/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?channelBackend=sf-databuffer
  &channelName=SLAAR-LSCP4-LAS6891:CH7:1&begDate=2021-05-25T00:00:00.000Z&endDate=2021-05-26T00:00:00.000Z&binCount=3'

Partial result

If the requested range takes longer time to retrieve, then a partial result with at least one bin is returned.

The partial result will contain the necessary information to send another request with a range that starts with the first missing bin.

This information is provided by the continueAt and missingBins fields.

This enables the user agent to start the presentation to the user while updating the UI as new bins are retrieved.

Example:

{
  "continueAt": "2021-05-25T16:00:00.000Z",
  "missingBins": 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
  ],
  "tsBinEdges": [
    "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 continueAt 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 finalisedRange: true to the response.

Search channel

Method: GET

URL: http://sf-daqbuf-21:8380/api/4/search/channel

Query parameters:

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

CURL example:

curl -H 'Accept: application/json' 'http://sf-daqbuf-21:8380/api/4/search/channel?sourceRegex=CV.E.+37&nameRegex=120.+y2$'

Example result

{
  "channels": [
    {
      "name": "S10MA01-DBPM120:Y2",
      "source": "tcp://S20-CVME-DBPM2371:9000",
      "type": "Float32",
      "shape": [],
      "unit": "",
      "description": ""
    },
    {
      "name": "S20SY02-DBPM120:Y2",
      "source": "tcp://S20-CVME-DBPM2371:9000",
      "type": "Float32",
      "shape": [],
      "unit": "",
      "description": ""
    }
  ]
}

Feedback and comments very much appreciated!

dominik.werder@psi.ch

or please assign me a JIRA ticket.