diff --git a/Readme.md b/Readme.md index 1783c95..0cbe03f 100644 --- a/Readme.md +++ b/Readme.md @@ -906,3 +906,69 @@ curl -H "Content-Type: application/json" -X POST -d '{"aggregationType":"extrem ] ``` + + +## Query Channel Status + +It is possible to retieve channel specific status information. + +### Request + +``` +POST http://:/status/channels +``` + +#### Data + +```json +{ + "channels":[ + "Channel_02", + "Channel_04" + ] +} +``` + +##### Explanation + +- **channels**: Array of channels to be queried (see [here](Readme.md#query_channel_names) and [here](Readme.md#define_channel_names)). + +### Example + +#### Command + +```bash +curl -H "Content-Type: application/json" -X POST -d '{"channels": ["Channel_02","Channel_04"]}' http://data-api.psi.ch/sf/status/channels | python -m json.tool +``` + +#### Response + +```json +[ + { + "channel":{ + "name":"Channel_02", + "backend":"sf-databuffer" + }, + "recording":true, + "connected":true, + "lastEventDate":"2016-07-06T09:16:19.607242575+02:00" + }, + { + "channel":{ + "name":"Channel_04", + "backend":"sf-archiverappliance" + }, + "recording":false, + "connected":false, + "lastEventDate":"2016-07-06T04:16:14.000000000+02:00" + } +] +``` + +##### Explanation + +- **channel**: The name and backend of the channel. +- **recording**: Defines if the channel is still recorded (please note that for beam synchronous DAQ this means that the source/IOC providing the channel is still recorded). +- **connected**: Defines if the channel is still connected (please note that for beam synchronous DAQ this means that the source/IOC providing the channel is still connected). +- **lastEventDate**: The timestamp of the last received event from the channel in the ISO8601 format.