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 Connector - Import Account JSON - Passing current date attribute

Lakhitha
New Contributor II
New Contributor II

Hi Team,

We are using rest connector to import the accounts from end system. There is a condition that if the assignment start date is less than today's date(current date) we need to import few of the attributes from end system.

Is there any way  to put the current date condition in Import account JSON?

We have tried by passing '{new Date().format('yyyy-MM-ddThh:mmssZ')}' this variable in import account JSON but it didn't work.

Thanks and Regards,

Lakhitha

 

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

Can you share JSON ? Is this condition will be in URL / Httpparam or you want to store in Customproperty


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Condition should be in URL. We are not storing current date to any Customproperty.

Lakhitha
New Contributor II
New Contributor II

Attaching the example URL below.

"url"="https://<url>$select=admin_id,adminid_value,start_date,end_date,&$filter=start_date lt CurrentDate and end_date gt CurrentDate

This URL we are adding it in the account import call under http section

 

 

You can try below

"https://abc.com/persons?person-group=contractor&effective-date>=${(new Date()).format('yyyy-MM-dd%20hh:mm:ss')}"

${(new Date()).format('yyyy-MM-dd')}


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Rushikesh,

Thanks for your response.

I have tried the above date format and getting the same error when we run the account import job.

Error - Null Response from Target and failed URL.

Thanks & Regards,

Lakhitha

Hello @Lakhitha,

Here's a link to the forum post which has a similar discussion. It has been suggested to create an attribute in the connection json to compute the date and then call that and use it in the import process.

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

Ive not tried this but see if this helps.

 

 

Regards,
Avinash Chhetri