Start Free Trial

Alteryx Designer Desktop Discussions

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

Change url string dynamically

matheusld2
7 - Meteor

Hello!

I'm making an api call to get a list of users. The api only returns 100 users at a time (we have approx. 1k users). To get the next group of users, I need to add the last user id provided in the url of the next call.

 

  • For example
    Initial url> [url]+[authorization_key]
    Results > User ids: 001, 002, 003
  • Then, the next url would have to be: [url]+[authorization_key]+"003"
    Results > User ids: 003, 004, 005
  • The next query would need to be: [url]+[authorization_key]+"005", and so on.

And I would need to repeat this until the end of the list of users (the amount is dynamic and can change every month). Any idea how to structure this solution? Ideally I would need a single database with all users at the end of the process.

Thanks!

 

3 REPLIES 3
ArtApa
Alteryx
Alteryx

Hi @matheusld2 - Your data source should be able to provide you with a number of rows. Then you just need to create the right number of API calls. Attached is a workflow example to solve this problem. Hope I documented it well for you.

ArtApa_0-1680244892900.png

 

matheusld2
7 - Meteor

Hello @ArtApa! Thanks for your response!

 

When I ran the worflow you sent, I got the same 100 users repeatedly.

 

I don't know if it helps, but I'm trying to connect to Miro's API. From what I understood from the documentation, in order for me to get the next group of users (users 101-200), I have to get the last user id from the original url and add it to the query. The user id is not sequential (it is a set of random numbers).

 

For example, the starting Url would be >>  "api.miro.com/v2/orgs/[org_id]/members".

 

This url would give me a list of 100 users, and let's assume the last user id is "1909827222". So the url would need to be updated to "api.miro.com/v2/orgs/[org_id]/members?&cursor=1909827222". And so it would be repeated until the end of the list of users.

 

Thanks a lot for the help and for the well organized worflow you sent before!

 

Best,

Matheus

krishguru2000
5 - Atom

Hey did you ever find a solution to this?

Labels
Top Solution Authors