Extract report only for selected period with API

ejeong
All-Star
All-Star

Hello

We are generating reports of completed tasks last 7 days for one of our consumers.

They are consuming data with Saviynt api but they asked if there is any parameter or request body to limit period for 1 or 2 days only when needed.

I found column can be restricted but if anyone has experience with date column, pls share that to me.

Thanks

7 REPLIES 7

nimitdave
Saviynt Employee
Saviynt Employee

@ejeong , You can explore runtime analytics for the same. You can use a dynamic attribute to filter out records for last 7 days. 

https://docs.saviyntcloud.com/bundle/EIC-Admin-v2022x/page/Content/Chapter17-EIC-Analytics/Creating-...

We made report already showing for 7 days. But if they want to see only last 3 days in this report. Please let me know how to restrict with task date column which is available in report. I want to know how to set "from" and "to" in request body

nimitdave
Saviynt Employee
Saviynt Employee

select a.TASKDATE,a.TASKKEY,a.TASKTYPE from arstasks a where a.TASKDATE between ${sdate} and ${edate}

You can send the values for sdate and edate while running the analytics or while calling api to execute the analytics.

Format for sdate ,edate can be 2022-03-14 00:00:00

@nimitdave  pls share sample request body using dynamic attr in api

You can pass it in the following way:

amit_krishnajit_0-1679897754276.png

 

 

Thanks,
Amit

Joon
New Contributor III
New Contributor III

Hello @amit_krishnajit ,

The current version in our environment doesn't support fetchDataV2.

I was trying to call API in this way, but the dynamic attribute seems not working.

Joon_0-1680018014233.png

and this is the analytic report that I want to run through the API

Joon_1-1680018068978.png

can you let me know how to put the dynamic attribute in the body ?

 

Joon
New Contributor III
New Contributor III

also tried to run with the attributes in the way that you provided, but got error like this.

Joon_2-1680019070240.png