Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

System Timestamp

anuragG
New Contributor III
New Contributor III

Hi Team,

I need to send system timestamp in createaccountJSON for a REST connector in the following format -

17-Nov-23 19:58:26

Below is the JSON -

{
"accountIdPath": "accountName",
"call": [{
"name": "call1",
"connection": "acctAuth",
"url": "<URL>",
"httpMethod": "POST",
"httpParams": "{ \"XGUID\": \"${user.customproperty21}\", \"S3_USER_ID\": \"${user.username}\", \"PERSON_STATUS\": \"${com.adw.PersonStatus.Personstatus(user.customproperty49)}\", \"LAST_NAME\": \"${user.lastname}\", \"FIRST_NAME\": \"${user.firstname}\", \"EMAIL\": \"${user.email}\", \"S3_EMPLOYEE_TYPE\": \"${user.employeeType}\", \"COUNTRY_CODE\": \"${com.adw.CountryCodeConverter_2.convertToThreeLetterCode(user.customproperty3)}\", \"COMPANY\": \"${user.companyname}\", \"STREET\": \"${user.street}\", \"STATE\": \"${user.state}\", \"POSTAL_CODE\": \"${user.region}\", \"MANAGER_NAME\": \"${com.adw.ManagerData.Mdp(user.owner.toString())}\", \"MANAGER_XGUID\": \"${com.adw.ManagerData.xguid(user.owner.toString())}\", \"TIME_STAMP\": \"${com.adw.SystemDateCalculator.getFormattedSystemDate()}\", \"RECORD_TYPE\": \"NEW\", \"SOR\": \"${user.customproperty15}\", \"FEED_PK\": \"${user.customproperty40}\", \"PERSONNEL_NUMBER\": \"${user.employeeid}\" }",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"successResponses": {
"statusCode": [200]
}
}]
}

 

It is the http param - TIME_STAMP

3 REPLIES 3

Saathvik
All-Star
All-Star

@anuragG : You can use ${Calendar.instance.format('dd-MMM-yy hh:mm:ss')}

If you want to use specific time zone then use below format

${Calendar.getInstance(TimeZone.getTimeZone("EST5EDT")).format("dd-MMM-yy hh:mm:ss")}


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

anuragG
New Contributor III
New Contributor III

Hi @Saathvik Thanks for the help it worked. One Question- Is this method Saviynt specific. If yes is there any documentation for such?

@anuragG : No it is not saviynt specific. It is just a java/groovy script. Also please mark the respective solution so that it will help others who are looking for similar solution.


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.