Reputation: 454
I'm working with the Okta API and trying to understand a couple of things:
I can iterate through the pages until I get to the last page, incrementing a counter as I go along, but this is very slow, especially when trying to get the number of groups defined for my subdomain, or other similarly high-numbered value.
Thanks!
Upvotes: 0
Views: 1107
Reputation: 11
AFAIK the only way to get a count is by getting all users/groups and subsequently the count. There is no API call to get a summary. Basic, but works.
Check the Okta API docs at http://developer.okta.com/docs/api/resources/users.html#user-model for the user model. You will get a collection of those JSON objects when you list the users - http://developer.okta.com/docs/api/resources/users.html#list-users
Call this last API and count the instances that you get back in the JSON collection.
Upvotes: 0