The docstring for datareservoirio.client.Client.search says "Otherwise, a dict is returned -> {TimeSeriesId: metadata}. My assumption was that the metadata part of that would be a dict, but I've seen that in some cases it's a list containing a string, and this string is a JSON-encoded dict.
This function is just returning the JSON response from the '/timeseries/search' endpoint, so - assuming this list of strings is incorrect - the problem must lie there. The swagger for this endpoint isn't very helpful.
So I'm left wondering: what should the metadata coming out of that search function be? Could someone at least document it?
For reference, there's the URL I was hitting: https://reservoir-api.4subsea.net/api/timeseries/search/rms
And here's the response:
> /home/austinbingham/repos/rms/.venv/lib/python3.12/site-packages/datareservoirio/client.py(296)search()
-> response.raise_for_status()
(Pdb) response.json()
{'<redacted>': ['{"Namespace":"rms","Key":"ABC:raw:motion:BOP:Ax","Value":{"kind":"raw","sensor_type":"motion","location":"BOP","channel":"Ax"}}']}
The docstring for
datareservoirio.client.Client.searchsays "Otherwise, a dict is returned ->{TimeSeriesId: metadata}. My assumption was that themetadatapart of that would be adict, but I've seen that in some cases it's a list containing a string, and this string is a JSON-encodeddict.This function is just returning the JSON response from the '/timeseries/search' endpoint, so - assuming this list of strings is incorrect - the problem must lie there. The swagger for this endpoint isn't very helpful.
So I'm left wondering: what should the
metadatacoming out of that search function be? Could someone at least document it?For reference, there's the URL I was hitting: https://reservoir-api.4subsea.net/api/timeseries/search/rms
And here's the response: