Hi folks,
Im trying to get something working so I can query OpenFIGI API (https://www.openfigi.com/api#post-v2-search) and pass in an ISIN code and get the security description and a few other fields back.
Have to admit to being a complete newb here - I did follow https://community.alteryx.com/t5/Engine-Works-Blog/REST-API-In-5-Minutes-No-Coding/ba-p/8137 and managed to get that to work but have no idea what Im doing with OpenFIGI API!
Can anybody take a look at the documentation and help me out? At this point Im just replicating the workflow in the example above, with text input and the download tool. I assume it should be set to get and not post but the documentation mentions POST /v2/mapping so am now sure - basically Im lost....
Solved! Go to Solution.
this is from the documentation where it mentions ISIN:
Value Description
ID_ISIN | ISIN - International Securities Identification Number. Example:
[{"idType":"ID_ISIN","idValue":"XX1234567890"}] |
Hi there @craigja
I was able to successfully query the OpenFIGI API using the following config in the Download tool.
I added the Content-Type to the Headers tab and modified the Payload tab to a Http Action ="POST"and Selected the Take Query String/Body from field with the field "type," resulting in
Dan
Excellent - thats shown me exactly what I need to do! Thanks so much
If I wanted to parameter this how would I do it? I tried as in the screenshot but I get this error: Request body must be a JSON array.
Hi @craigja
I've never had success going directly with parameters in this way, because the Content Type encoding selection doesn't include "none". Applying URL endcoding changes the JSON string by replacing the non-standard characters with URL acceptable characters, i.e. double-quote becomes %22, essentially corrupting it.
If you need to parameterize, consider using formulas to build up your JSON [type] field, something like
'[{"idType": "' +[idTypeValue] +'", "idValue": "'+ [idValue]+ '"}]'
Dan