Fetching data using date time limit

I’m using search api to get the details for identities which have been created so far, but as data fields are more than 10K and I’ve provided query like
{ "indices": ["identities"], "query": {"query": "created: [2010-05-19T19:26:03.351Z TO now]"}, "sort":["id"], "searchAfter":["0097438a18874e327618a4c8fb20625e"] }

I have some confusions for fetching the data

  1. what if my script get stuck and gets resumed after some hours so will above query take now as updated time or now will be same as time we fired this query?
  2. Is there any limit we to fetch old data? Like some APIs have 90 days lookback period, does sailpoint has that limitation?
  3. If I use events indices in search api will it provide data related to identity account creation/deletion as well? Or do we need to use identities indices only to get that data?
  4. How can we use time range to get the data for specific time frame, while keep using searchAfter

Hi @rushikesh_cwd ,

You can limit data size returned by using : queryResultFilter to limit returned attribute.
example :

"queryResultFilter": {
    "includes": [
      "attributes",
    ],

  }

With your initial query :

{
	"indices": ["identities"],
	"query": { "query": "created: [2010-05-19T19:26:03.351Z TO now]" },
	"sort": ["id"],
	"queryResultFilter": {
		"includes": ["attributes"]
	},
	"searchAfter": ["0097438a18874e327618a4c8fb20625e"]
}

HI @ondiaye , thanks for the reply, I got your point. Also do you have insights about this?
what if my script get stuck and gets resumed after some hours so will above query take now as updated time or now will be same as time we fired this query?

If stuck is at your script level, now is not when you start the script but the moment when you sent the request after stuck.

now is the moment when IDN receive your request
It does like “new Date()” got get current date and time

thanks @ondiaye it will help a lot.
I had tried using Range to get the data for last 1 year, so how can I paginate that data?

You can exploit limit, offset and count=true in query params.

In your script do you use Sailpoint SDK or REST API ?

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