Currently available:
Method: POST
URL: https://data-api.psi.ch/api/1/channels
Request body: JSON with search parameters
Request body outline:
{
"regex": "[Optional: Regular expression to search in channel name]",
"sourceRegex": "[Optional: Search in sourcename of the channel]",
"descriptionRegex": "[Optional: Search in the channel's description]",
"backends": ["gls-archive", "hipa-archive", "sf-databuffer"]
}
Request body example:
{
"regex": "SARES20-LSCP9:CH0",
"backends": ["sf-databuffer", "hipa-archive"]
}
Result body example:
Assuming that "hipa-archive" would be unavailable:
[
{
"backend": "sf-databuffer",
"channels": [
"SARES20-LSCP9:CH0:2",
"SARES20-LSCP9:CH0:1"
]
},
{
"backend": "hipa-archive",
"channels": [],
"error": {
"code": "Error" // can be: "Error" | "Timeout" (more to be added in the future)
}
}
]
Notes:
The search constraints are AND'ed together.
If some backend responds with an error, that error is indicated by the error key in the affected backend (see example above).
QUERY='{ "regex": "LSCP9:CH0", "backends": ["sf-databuffer"] }'
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -d "$QUERY" https://data-api.psi.ch/api/1/channels
Method: POST
URL: https://data-api.psi.ch/api/1/channels/config
Request body: JSON with search parameters
Request body outline:
{
"regex": "[Optional: Regular expression to search in channel name]",
"sourceRegex": "[Optional: Search in sourcename of the channel]",
"descriptionRegex": "[Optional: Search in the channel's description]",
"backends": ["gls-archive", "hipa-archive", "sf-databuffer"]
}
Result body example:
Assuming that "hipa-archive" would be unavailable:
[
{
"backend": "sf-databuffer",
"channels": [
{
"backend": "sf-databuffer",
"description": "",
"name": "SARES20-LSCP9:CH0:2",
"shape": [
512
],
"source": "tcp://SARES20-CVME-01:9999",
"type": "Float32",
"unit": ""
},
{
"backend": "sf-databuffer",
"description": "",
"name": "SARES20-LSCP9:CH0:1",
"shape": [
512
],
"source": "tcp://SARES20-CVME-01:9999",
"type": "Int16",
"unit": ""
}
]
},
{
"backend": "hipa-archive",
"channels": [],
"error": {
"code": "Error" // can be: "Error" | "Timeout" (more to be added in the future)
}
}
]
Notes:
The search constraints are AND'ed together.
If some backend responds with an error, that error is indicated by the error key in the affected backend (see example above).
QUERY='{ "regex": "LSCP9:CH0", "backends": ["sf-databuffer"] }'
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -d "$QUERY" https://data-api.psi.ch/api/1/channels/config
Method: GET
URL: https://data-api.psi.ch/api/1/map/pulse/PULSEID
Result body example:
1677392847564
curl -H 'Content-Type: application/json' -H 'Accept: application/json' https://data-api.psi.ch/api/1/map/pulse/7461843
Feedback is very much appreciated:
dominik.werder@psi.ch
or please assign me a JIRA ticket.