-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Is your feature request related to a problem? Please describe.
When polling the status of a request (GET /requests/{request_id} we don't get any information regarding the user parameters in the response.
To see them we must instead request the general GET /requests endpoint and filter the message array with the request id.
This become quickly cumbersome with plenty of requests.
Describe the solution you'd like
There is already a method GET /requests/{request_id} that return the current status of the request.
I would like this method to also return the user_request parameters in the response.
Similarly, the GET /requests returns an array of object in a JSON message key.
{
"message": [
{
"id": "fccd56af-055a-4888-b2de-acab27dd46ac",
"timestamp": 1741453923.619513,
"last_modified": 1741711644.41524,
"user": {},
"verb": "retrieve",
"url": "",
"md5": null,
"collection": "destination-earth",
"status": "queued",
"user_message": "Skipping datasource polytope: request does not contain key 'feature'\nSkipping datasource polytope: request does not contain key 'feature'\nMatched datasource mars\nDatasource mars accepted request.\n\nWorker shutdown, rescheduling request.",
"user_request": "{'activity': 'ScenarioMIP', 'class': 'd1', 'dataset': 'climate-dt', 'date': '20250228/to/20250302', 'experiment': 'SSP3-7.0', 'expver': '0001', 'generation': '1', 'levtype': 'sfc', 'model': 'IFS-NEMO', 'param': '134/165/166', 'realization': '1', 'resolution': 'high', 'stream': 'clte', 'time': '0', 'type': 'fc'}",
"content_length": null,
"content_type": "application/octet-stream"
},
...
]
}It would be more coherent if GET /requests/{request_id} would return the matching object instead of a single key in the same message key.
Replacing:
{
"message": "Skipping datasource polytope: request does not contain key 'feature'\nSkipping datasource polytope: request does not contain key 'feature'\nMatched datasource mars\nDatasource mars accepted request.\n\nWorker shutdown, rescheduling request.",
"status": "queued"
}by something alike to:
{
"id": "fccd56af-055a-4888-b2de-acab27dd46ac",
"timestamp": 1741453923.619513,
"last_modified": 1741711644.41524,
"user": {...},
"verb": "retrieve",
"url": "",
"md5": null,
"collection": "destination-earth",
"status": "queued",
"user_message": "Skipping datasource polytope: request does not contain key 'feature'\nSkipping datasource polytope: request does not contain key 'feature'\nMatched datasource mars\nDatasource mars accepted request.\n\nWorker shutdown, rescheduling request.",
"user_request": "{'activity': 'ScenarioMIP', 'class': 'd1', 'dataset': 'climate-dt', 'date': '20250228/to/20250302', 'experiment': 'SSP3-7.0', 'expver': '0001', 'generation': '1', 'levtype': 'sfc', 'model': 'IFS-NEMO', 'param': '134/165/166', 'realization': '1', 'resolution': 'high', 'stream': 'clte', 'time': '0', 'type': 'fc'}",
"content_length": null,
"content_type": "application/octet-stream"
}Describe alternatives you've considered
Requesting directly GET /requests instead of GET /requests/{request_id} but that would defeat the point of having a GET /requests/{request_id} endpoint.
Additional context
I am developping the integration of Polytope with EODAG in the context of the DestinE Data Lake HDA.
Organisation
CS Group