RDMS API: Metadata search is not working

I am doing the following query to the RDMS API:

query='Variable.is=Consumption+Dataset.In.is=ECMWF.Ens Weekly Long Term&MaxResults=10000'

result = requests.get('https://sprod1.rdms.refinitiv.com/api/v1/Metadata/Search?query='+query, headers=headers, verify=True)

values = result.json()


It returns other variables than consumption, like wind etc, meaning the + operator does not filter as I want to. How can I return only consumption curves?

Tagged:

Best Answer

  • billy.dineen
    billy.dineen Explorer
    Answer ✓

    Hello,

    The cause of this is that the + operator does not operate within this query parameter as you expect.

    In order to achieve the results you are looking for please include double quotes around consumption.

    Such as:

    Variable.is="Consumption"+Dataset.In.is=ECMWF.Ens Weekly Long Term

    This will return CurveIDs where Variable.is is exactly equal to consumption.

    I have included a help guide which will explain the syntax for the query string parameterquery-string-parameter-help-guide.png

    Please let me know if you have any further questions.

    Thanks

    Billy

Answers