Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Help accessing OpenFIGI API

craigja
8 - Asteroid

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....

6 REPLIES 6
craigja
8 - Asteroid

this is from the documentation where it mentions ISIN:

Value Description

ID_ISIN

ISIN - International Securities Identification Number.

 

Example:

 

[{"idType":"ID_ISIN","idValue":"XX1234567890"}]
danilang
19 - Altair
19 - Altair

Hi there @craigja 

 

I was able to successfully query the OpenFIGI API using the following config in the Download tool.

 

Config.png

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 

 

Results.png

 

 

 

 

Dan

craigja
8 - Asteroid

Excellent - thats shown me exactly what I need to do!  Thanks so much

craigja
8 - Asteroid

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.

 

 

craigja
8 - Asteroid

never included the image!

danilang
19 - Altair
19 - Altair

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

Labels