<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00009Wk5GlCAJOkta Classic EngineAPI Access ManagementAnswered2023-08-01T00:09:17.000Z2023-07-31T16:53:48.000Z2023-08-01T00:09:17.000Z
  • DonF.81354 (Customer)

    Yes! Please take a look at how this could be resolved below:

     

    import requests

     

    url = "https://yourOktaDomain/api/v1/apps"

    headers = {

      'Accept': 'application/json',

      'Content-Type': 'application/json',

      'Authorization': 'SSWS yourAPIToken',

    }

     

    response = requests.get(url, headers=headers)

     

    while 'next' in response.links.keys():

      print(response.json())

      response = requests.get(response.links['next']['url'], headers=headers)

     

    print(response.json())

     

    This is because the API typically only returns 200 responses by default. By using the "Link" header in the response, it will get you the next page of results. You can loop through the pages and then you get all the data you want/need.

     

    Just plug this into what you have already (where possible / where it makes sense) and you should be good to go! Please reach back out if you have any questions or concerns.

     

    Thanks!

    Expand Post
This question is closed.
Loading
OKTA Application API