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

How to pass date in API parameters

adityachadde
New Contributor III
New Contributor III

Hi,

We are trying to reconcile the users in Saviynt we need to add the last run date in the below API URL in ISO 8601 format.

URL/http/getEmployeeDataForAD_delta?lastRunDateTime=2024-05-13T12:05:00Z

The date should be one day before the current date.

How can we achieve this?

We are using below user import JSON

{
"connection": "userAuth",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"url": "l?mode=FULL&employeeNumber=99000917,99100149,99000918,99000919,99000920,99000921,99000922,99000916,99000915,99000914,99000895,99000894",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Content-Type": "application/json"
},
"userResponsePath": "EmployeeData.Record",
"colsToPropsMap": {
"startdate": "effectiveDate~#~epochdate",
"country": "countryCode~#~char",
"companyname": "company~#~char",
"orgunitid": "companyCode~#~char",
"city": "l~#~char",
"state": "st~#~char",
"street": "streetAddress~#~char",
"username": "employeeNumber~#~char",
"departmentname": "department~#~char",
"departmentNumber": "departmentNumber~#~char",
"employeeType": "employeeType~#~char",
"jobDescription": "title~#~char",
"displayname": "displayName~#~char",
"CUSTOMPROPERTY24": "employeeNumber~#~char",
"firstname": "givenName~#~char",
"lastname": "sn~#~char",
"entity": "#CONST#WW SuccessFactors~#~char",
"CUSTOMPROPERTY4": "manager~#~char",
"CUSTOMPROPERTY49":"mobile~#~char",
"CUSTOMPROPERTY50":"telephoneNumber~#~char",
"systemusername": "#CONST#${String r1 = response; String r2=response.employeeNumber+response.companyCode;return r2}~#~char",
"leaveStatus": "employeeStatus~#~char",
"endDate": "terminationEffectiveDate~#~char"
}
}

Best Regards,

Aditya Chadde

4 REPLIES 4

Raghu
Valued Contributor III
Valued Contributor III

@adityachadde  below article will help full

https://forums.saviynt.com/t5/identity-governance/pass-a-dynamic-date-in-url-in-rest-api-call/m-p/85...

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

rushikeshvartak
All-Star
All-Star

adityachadde
New Contributor III
New Contributor III

Hi Team,

We have tried with this "url":"/getEmployeeDataForAD_delta?countryCode=BGR,ESP&lastRunDateTime=${Calendar today=Calendar.getInstance();today.add(Calendar.HOUR_OF_DAY, -24);today.getTime().format(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\")}",

 

It's working.

Best Regards,

Aditya Chadde

👍Please click the 'Accept As Solution' button on the reply (or replies) that best answered your original question.


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