BardMorgan
BardMorgan

Reputation: 454

Using the Okta API and .Net SDK

I'm working with the Okta API and trying to understand a couple of things:

  1. How do you get a count of members. For example, how do I get a count of groups defined, or the count of users assigned to a group. The admin tool seems to do this easily enough, but I need to do this in another tool I'm working on.

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.

  1. How do filters and filterbuilders work? The basics are pretty simple, but the filter syntax doesn't seem to be defined anywhere.

Thanks!

Upvotes: 0

Views: 1107

Answers (1)

Pookus
Pookus

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

Related Questions