Skip to content

Documentation for Client.search() is unclear and/or incorrect #153

Description

@austin-bingham-4ss

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"}}']}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions