Implementation of endpoints dedicated to gather feedback from the data acquisition software
In order to provide feedback on real time to the DA software. It was agreed with @denolf that 2 endpoints are needed.
1) endpoint that given a proposal name + beamline + (date) then it is validated
@denolf Probably the easiest will be to use this existing endpoint where sessionId is the API Key
If the method returns a JSON value with data on it then the investigation exists otherwise it can be understood that the proposal name is not valid or unknown.
Example on a valid proposal (HTTP status = 200):
https://icatplus.esrf.fr/catalogue/{sessionId}/investigation?investigationName=BLC13100&instrument=ID01?time=2020-07-05T08:00:00.000Z
returns:
{
"name": "BLC-13100",
"startDate": "2021-07-05T08:00:00.000+02:00",
"endDate": "2021-07-28T08:00:00.000+02:00",
"id": 484880020,
"title": "Test of the gas panel in LOB012",
"visitId": "BLC/13100 ID01 05-07-2021/28-07-2021",
"parameters": {},
"instrument": {
"name": "ID01",
"id": 2244031
}
}
Example of a non-valid proposal (HTTP status = 500):
https://icatplus.esrf.fr/catalogue/{sessionId}/investigation?investigationName=BLC13100&instrument=ID01?time=2020-07-05T08:00:00.000Z
returns:
{
"message": "Failed to getAllocatedInvestigation"
}
2) endpoint that given a session then it returns a list of datasets
https://icatplus.esrf.fr/catalogue/{sessionId}/investigation/id/{investigationId}/dataset
Edited by Alejandro De Maria Antolinos