Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

API and Web Data Connector

knozawa
11 - Bolide

Here is my Text Input data

urlapi_keystart_dateend_dateid
https://api.xxxxx?auth=xxxxx&start=xxxxx&end=xxxxx&id=xxxxxxxxxxxxxxxxxxxxxxxxx

 

API and WDC.png

I used interface tools to replace value in Tableau Web Data Connector.  However, the url contains api_key, start_date, end_date, and id, so I always get the same result.

 

Does anyone know how to approach this?

 

Thank you,

Kazumi

7 REPLIES 7
KaneG
Alteryx Alumni (Retired)

Hi @knozawa,

 

You need to use a formula tool after the text input to construct the URL from the fields that you have changed.

 

Kane

knozawa
11 - Bolide

Hi ,

 

Thank you for your reply.

I used a formula tool after the text input. However, I still have an error message "Type mismatch in operator +".

 

My formula is like this:

[url] = "https://api.xxxxxxxxxxxxxxxxxxxx?auth="+[api_key]+"&start="+[start_date]+"&end="+[end_date]+"&id="+[...

 

Would you know how to approach this issue?

 

Thank you,

Kazumi

 

knozawa
11 - Bolide

[id] was int64, so I changed formula to following:

 

"https://api.xxxxxxxxxxxxx?auth"+[api_key]+"&start="+[start_date]+"&end="+[end_date]+"&id="+ToString(...])

 

It works now!

 

Thank you.

Kazumi

awojciechowski
8 - Asteroid

could you save here or share me file with this Alteeryx function because I'm looking solutions to change automatically start dade and end date in a few URL in the same time. 

 

awojciechowski
8 - Asteroid

could you share me workflow in alteryx to change this part of URL.

I have really basic knowledge so I need more your help

KaneG
Alteryx Alumni (Retired)

Hi @awojciechowski,

 

Here is an example of dynamically changing those dates in the address:

 

The text input holds the 4 variables that are included in the api address. The formula tool constructs the address according to these variables with the following formula:

 

"https://api.xxxxxxxxxxxxx?auth"+[api_key]+"&start="+[start_date]+"&end="+[end_date]+"&id="+ToString(...])

 

 

Dynamic_API_Address.png

awojciechowski
8 - Asteroid

Thanks for help, It works very good :)

Labels