question

Upvotes
Accepted
98 5 5 15

Get available choices values by metada fields to use as RSearch filter criteria

Hi i'm wondering if it's possible to get programatically all available choices values for each item usable as Search criteria when setting RDP search function(ex:IssuerCountry, AssetStatus, AssetTypeDescription...). As we can get available fields to be used for filtering by families (meta = rdp.get_search_metadata(view=SearchViews.FixedIncomeInstruments), can you confirme me if such stuff can be done for available values choices. Regards
rdp
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @anass.yazane.1 ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


Upvote
Accepted
32.2k 40 11 20

Hello @anass.yazane.1 ,

If I understand your question correctly, I can suggest a quick way, that may not be necessarily the best way, RDP API, direct call, rather then RDP API Library:

GET https://{
                {RDP_HOST}}/discovery/search/v1/metadata/views/FixedIncomeInstruments

Should result in all available metadata for FixedIncomeInstruments as json:

fixedincodeinstruments.gif


However, if this is what you are looking for, you would not usually run this request often, programmatically, you likely would expect to run it once, to pinpoint your requirements within the available properties. If you only need this information once, to properly design your integration, you may just collect this info via API Playground -> Search -> Metadata/Views as well.

Hope this information helps.



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
399 4 5 9

Hi @anass.yazane.1 ,

I addition to what Zoya already suggested, you can take advantage of Navigators which groups values by showing value name and the count. Here is an example of using Navigator on AssetCategoryName along with the output.

response = rdp.Search.search(
    view = rdp.SearchViews.FixedIncomeInstruments,
    navigators = "AssetCategoryName",
)
response.data.raw["Navigators"]["AssetCategoryName"]

1639563197076.png


However, it should be noted, that you can do this only for Navigable properties. Whether the property is Navigable or not you can find in RDP API Library (as suggested by Zoya) or from the output of rdp.get_search_metadata(view=SearchViews.FixedIncomeInstruments). For the non-Navigable items, you may find this article useful which simplifies the challenges of discovering financial properties and the values when programmatically building Search.


1639563197076.png (44.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.