Prefix sf- to databuffer and archiverappliance
This commit is contained in:
22
Readme.md
22
Readme.md
@ -9,7 +9,7 @@ This project requires Java 8 or greater.
|
|||||||
|
|
||||||
# Deployment
|
# Deployment
|
||||||
|
|
||||||
Use the instructions provided by [ch.psi.daq.install](https://git.psi.ch/sf_daq/ch.psi.daq.install#query_rest) to install the application on a server.
|
This application runs in a [docker container](https://github.psi.ch/docker/query_rest). Use the instructions provided by [ch.psi.daq.install](https://git.psi.ch/sf_daq/ch.psi.daq.install#query_rest) to install the application on a server.
|
||||||
|
|
||||||
## Application Properties
|
## Application Properties
|
||||||
|
|
||||||
@ -61,13 +61,13 @@ POST http://<host>:<port>/channels
|
|||||||
#### Data
|
#### Data
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{"regex": "TRFCA|TRFCB","backends": ["databuffer"],"ordering":"asc","reload":true}
|
{"regex": "TRFCA|TRFCB","backends": ["sf-databuffer"],"ordering":"asc","reload":true}
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Explanation
|
##### Explanation
|
||||||
|
|
||||||
- **regex**: Reqular expression used to filter channel names. In case this value is undefined, no filter will be applied. Filtering is done using JAVA's [Pattern](https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html), more precisely [Matcher.find()](https://docs.oracle.com/javase/8/docs/api/java/util/regex/Matcher.html#find--)).
|
- **regex**: Reqular expression used to filter channel names. In case this value is undefined, no filter will be applied. Filtering is done using JAVA's [Pattern](https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html), more precisely [Matcher.find()](https://docs.oracle.com/javase/8/docs/api/java/util/regex/Matcher.html#find--)).
|
||||||
- **backends**: Array of backends to access (values: databuffer|archiverappliance). In case this value is undefined, all backends will be queried for their channels.
|
- **backends**: Array of backends to access (values: sf-databuffer|sf-archiverappliance). In case this value is undefined, all backends will be queried for their channels.
|
||||||
- **ordering**: The ordering of the channel names (values: **none**|asc|desc).
|
- **ordering**: The ordering of the channel names (values: **none**|asc|desc).
|
||||||
- **reload**: Forces the server to reload cached channel names (values: **false**|true).
|
- **reload**: Forces the server to reload cached channel names (values: **false**|true).
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ curl -H "Content-Type: application/json" -X POST -d '{"regex": "AMPLT|PHASE"}' h
|
|||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"backend":"databuffer",
|
"backend":"sf-databuffer",
|
||||||
"channels":[
|
"channels":[
|
||||||
"Channel_01",
|
"Channel_01",
|
||||||
"Channel_02",
|
"Channel_02",
|
||||||
@ -92,7 +92,7 @@ curl -H "Content-Type: application/json" -X POST -d '{"regex": "AMPLT|PHASE"}' h
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"backend":"archiverappliance",
|
"backend":"sf-archiverappliance",
|
||||||
"channels":[
|
"channels":[
|
||||||
"Channel_01",
|
"Channel_01",
|
||||||
"Channel_04",
|
"Channel_04",
|
||||||
@ -142,7 +142,7 @@ The simplest way to define channels is to use an array of channel name Strings.
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
The query interface will automatically select the backend which contains the channel (e.g., *databuffer* for *Channel_02* and *archiverappliance* for *Channel_04*). In case name clashes exist, the query interface will use following order of priority: *databuffer* and then *archiverappliance*.
|
The query interface will automatically select the backend which contains the channel (e.g., *sf-databuffer* for *Channel_02* and *sf-archiverappliance* for *Channel_04*). In case name clashes exist, the query interface will use following order of priority: *sf-databuffer* and then *sf-archiverappliance*.
|
||||||
|
|
||||||
It is also possible to explicitly define the backend to overcome name clashes.
|
It is also possible to explicitly define the backend to overcome name clashes.
|
||||||
|
|
||||||
@ -150,11 +150,11 @@ It is also possible to explicitly define the backend to overcome name clashes.
|
|||||||
"channels":[
|
"channels":[
|
||||||
{
|
{
|
||||||
"name":"Channel_01",
|
"name":"Channel_01",
|
||||||
"backend":"archiverappliance"
|
"backend":"sf-archiverappliance"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"Channel_01",
|
"name":"Channel_01",
|
||||||
"backend":"databuffer"
|
"backend":"sf-databuffer"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
@ -361,11 +361,11 @@ See JSON representation of the data above.
|
|||||||
"channels":[
|
"channels":[
|
||||||
{
|
{
|
||||||
"name": "Channel_01",
|
"name": "Channel_01",
|
||||||
"backend":"archiverappliance"
|
"backend":"sf-archiverappliance"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Channel_02",
|
"name": "Channel_02",
|
||||||
"backend":"archiverappliance"
|
"backend":"sf-archiverappliance"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -377,7 +377,7 @@ Archiver Appliance supports queries by *time range* and *date range* only (as it
|
|||||||
##### Command
|
##### Command
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -H "Content-Type: application/json" -X POST -d '{"range":{"startSeconds":"0.0","endSeconds":"0.030999999"},"channels":[{"name": "Channel_01","backend":"archiverappliance"}]}' http://data-api.psi.ch/sf/query | python -m json.tool
|
curl -H "Content-Type: application/json" -X POST -d '{"range":{"startSeconds":"0.0","endSeconds":"0.030999999"},"channels":[{"name": "Channel_01","backend":"sf-archiverappliance"}]}' http://data-api.psi.ch/sf/query | python -m json.tool
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Response
|
##### Response
|
||||||
|
Reference in New Issue
Block a user