IDN API to Get All Accounts (correlated and uncorrelated) from a certain Target System

Hi,

I’m trying to retrieve all the accounts from particular source in my Identitynow. what I mean by all accounts includes uncorrelated accounts.

I tried to use the v3 get accounts api:
{{baseUrl}}/v3/accounts?filters=sourceId eq “47ce5419701040c593789252007aed5d”

but this api have a maximum number of records to return in a single API call which is 250.

is there a way to do paging? like fetch the first 250 accounts from page 1 then, another api call to fetch page 2 then next 250 accounts.

Thanks in advance.

Hi @Rpalos,

I believe the options you are looking for are limit & offset param which looks like the following,

{{baseUrl}}/v3/accounts?limit=250&offset=0&filters=sourceId eq “47ce5419701040c593789252007aed5d”

For more references related to the API do check this link.

Note: The offset value is record-based, not page-based, and the index starts at 0

To get the next 250 accounts the Query will look something like,

{{baseUrl}}/v3/accounts?limit=250&offset=249&filters=sourceId eq “47ce5419701040c593789252007aed5d”

Note: Collection is done based on array indexing and starts from 0. So the first 250 records number from 0-249 (offset=0, limit=250) & second 250 records number from 250-499 (offset=249, limit=250) and so on.

The collection standards imply that its its 250 per page like you said. If you want to explore more on the other options and standards that go with collection type endpoint check here

1 Like

I would add to this to make sure you’re adding a “sorters” query parameter to this… preferably something like id that does not change.

I’ve found that sometimes the default sorting isn’t consistent and can lead to not getting back all the records or bringing in duplicates

1 Like

Hi gladstone,

Thanks! I can fetch now all the accounts from the target system.

1 Like

Hi mark,

I see. I’ll make sure to add the sorters parameter as well. Thanks for the inputs.

offset should be 250 to get the 251st record onwards.

Very important point indeed… It drove me crazy when I had a case where there were few thousands of records and it took a me a long time to figure out the solution :smiley:

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