Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

API for the Alteryx License Portal

sp210708
8 - Asteroid

Hello,

 

I am a newbie with API's and wanted to build a quick workflow to connect to the data in our license portal. (both for educational purposes - learning about API's and building a functional workflow to track licenses)

 

Once I log in to the portal I see the API screen, which has the access token, refresh token and how to request it programmatically.

API docs are there but this is gibberish to me.

 

Trying to connect using the download tool but I don't know what I'm doing and no matter what I do it errors out.

Please help,

Thx,

13 REPLIES 13
ArnaldoSandoval
12 - Quasar

Hi @sp210708 

 

Before jumping into deep waters, I strongly suggest these resources:

 

API's in Alteryx 

Enjoy the learning.

Arnaldo

 

sp210708
8 - Asteroid

Thanks @ArnaldoSandoval 

 

I'm into the webinar however parts are outdated. I can't just replicate the webinar as the api site now requires a login.

There is also a DCM connection manager which doesn't exist in the webinar.

 

I created a login for the site, and added credentials to the DCM which is different from the video and now I'm getting an error saying my subscription doesn't have HTTPS encryption. I've deviated so far from the video at this point I'm not sure what I'm doing wrong.

 

Here is the response I get from the DownloadData column

{"error":{"code":"https_access_restricted","message":"Access Restricted - Your current Subscription Plan does not support HTTPS Encryption."}}

 

 

sp210708
8 - Asteroid

Edit @ArnaldoSandoval I removed the s from https and getting the call,

 

thanks,

ArnaldoSandoval
12 - Quasar

Hi @sp210708 

 

I attached the Guardian API, (The Guardian Open Platform); I haven't tried the first one.

 

Arnaldo

sp210708
8 - Asteroid

Has anyone got the Alteryx API to work? I have the basics down however I am missing something.

I have got API's to work across 3 separate APIs however I am stuck on this one. It is continually telling me error 401 insufficient access.

 

However I put in my credentials in the DCM still an error.

Also I have an Access token but in the API documentation there is no use of this API token???

 

I tried adding ?api_key=xxxxx but still getting the error and there is no documentation on this I am seeing?

 

here is the API documentation - however there is no mention of the API token,

https://us1.alteryxcloud.com/license-portal/api/swagger-ui/index.html#/Device%20Resource/findDevices...

 

richardbryantapd
5 - Atom

Hi @sp210708,

 

See the attached workflow for a sample that will call the Devices API. There are instructions in the bottom-left corner of the workflow.

 

There are two key pieces. First, you generate the tokens on the Alteryx licensing portal. After you log in, left-click the circle in the top-right corner and choose "API Access" from the drop-down menu.

 

Second, you can use the headers tab in the Download tool to pass your access token. The field should be named "Authorization" and its value should be "Bearer " + [field_containing_your_access_token]. See the attached workflow for details.

 

Regards,

Richard

sp210708
8 - Asteroid

Thanks @richardbryantapd - it is working now!

 

The only issue is that some of the data is incorrect. For some reason it is showing some inactive licenses as active licenses as well as the last modified date and last request time are different than what they show in the license portal.

 

Any idea why the data wouldn't align?

 

Thanks,

Shane

richardbryantapd
5 - Atom

I don't have any ideas on that. You would probably have to contact Alteryx directly for more details.

 

It may be worth investigating other endpoints (/users, for example) to see if there are overlapping fields with /devices and if the information is consistent with /devices and what shows in the license portal.

carl_cimino
7 - Meteor

How would you automate this in a workflow that then feeds into the solution above?

 AccessRefreshTokenRetrieval.png

Labels
Top Solution Authors