Hopefully an easy API query question

I’m doing some work with the Okta API in Workflows to do with applications. I’m very novice when it comes to working with API’s

I’m running the following in the Custom API Action > /api/v1/apps?limit=200 > to get a list of all the apps in the Org > then passing the body returned to a JSON Stringify > then to a JSON Parse > then Pluck to get the “id” of each app, to use in a child flow.

Seems like a lot just to get the “id”…

Is there a query or filter of some kind that I can run so that I can try to minimise the number of addition card to get just the “id” of each of the apps in the Org. My colleague could do it with the Okta PowerShell modules > $allOktaApps.id

Also, I noticed that the max Limit on the API documentation is 200. What happens if I have more than 200 apps in my Org? Say I have bookmarked 100’s of Advanced Server Access URL Handled bookmark apps.

Appreciate the help if someone knows a thing or 2.

Thanks,
Steve

Are you hoping to iterate through the full list of apps in your child flow?

Before getting into pagination, to pass the output of this Custom API Action card into your child flow, you should only need to use JSON Parse. Here’s an example flow I made that runs GET /api/v1/apps and then passes the list of apps into a child flow so I can run GET calls for each individual application:

You’ll see that I feed the Custom API Action’s response body into the JSON Parse, and, for the output of that card, I am adding the ‘id’ as a key for each object in the list. This allows me to specify that the ‘id’ value is the input I’d like to share with the child flow. Here’s what the child flow from my test looks like:

Pagination is trickier so I’m checking to see if we have any guides/template flows for how to implement this without reinventing the wheel

Thanks for your response Andreas and the Workflow tips, I should be able to make things a little less complex than it needs to be.

I did find a GitHub which seems to do the trick - https://github.com/bgarlow/workflows

After a little reading and understanding of how it worked, I got it working. Very helpful!

Nice, glad you were able to find those template flows!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.