Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Rest API to get only future startdate records

sppnra
Regular Contributor
Regular Contributor

Hi Saviynt Team,

We need to find a logic to just to pull future start date user records. Write now I am trying to use below suggestions from related forums 

https://forums.saviynt.com/t5/identity-governance/rest-connector-specify-a-date-that-is-15-days-in-t...

 

sppnra_0-1698251011850.png

I have added this function in ConnectionJSON and trying to call that in ImportUserJSON

sppnra_1-1698251116101.png

But its not working getting [error:Error Illegal character in query at index 2470:

Please let me know what may be the issue

 

4 REPLIES 4

GSR
New Contributor III
New Contributor III

Please follow below sample

$filter=employmentNav/jobInfoNav/startDate+gt+datetime'${new Date(Calendar.getInstance().getTimeInMillis()).format('yyyy-MM-dd')}T00:00:01'&fromDate=${new Date(Calendar.getInstance().getTimeInMillis()).format('yyyy-MM-dd')}&toDate=${new Date(Calendar.getInstance().getTimeInMillis()+(15*86400000)).format('yyyy-MM-dd')}

sppnra
Regular Contributor
Regular Contributor

Getting the same error @GSR 

sppnra_0-1698261544643.png

[This post has been edited by a Moderator to remove tags to employees and other forum users.]

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @sppnra 

We are looking into this and will keep you posted.

Regards,

Dhruv Sharma

sppnra
Regular Contributor
Regular Contributor

Hi @Dhruv_S ,

This issue is resolved please ignore it, please find the below JSON to use in URI for get the future dated records 

%24filter=startDate%20gt%20datetimeoffset'${Calendar aa=Calendar.getInstance();aa.getTime().format(\"yyyy-MM-dd'T'H:mm:ss'Z'\")}'",

thanks,

Rahul

[This message has been edited by moderator to remove hyperlink]