Utilizing Custom Date Transformations with SailPoint's API
More Fun with Sailpoint API
Introduction
SailPoint, a leading identity governance platform, provides a flexible API that permits users to seamlessly interact with its various features. Among its many functionalities is the ability to transform date formats. In this guide, we'll delineate the method to invoke this API for custom date transformations and spotlight a syntax that remains undocumented in SailPoint's official manuals.
Calling SailPoint's API To Create Custom Transform Map
Endpoint:https://{tenantname}.api.identitynow.com/v3
For the purpose of invoking the API, we can utilize tools or libraries capable of transmitting HTTP requests. For this illustration, we'll employ curl:
curl -X POST \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "CustomUTCMap",
"type": "firstValid",
"attributes": {
"values": [
{
"attributes": {
"input": {
"attributes": {
"attributeName": "Start Date",
"sourceName": "HR System"
},
"type": "accountAttribute"
},
"inputFormat": "MM/dd/yy",
"outputFormat": "yyyyMMddHHmmss'.0Z'"
},
"type": "dateFormat"
},
"01/01/20"
]
},
"internal": false
}' \
https://{tenantname}.api.identitynow.com/v3
Here, replace YOUR_ACCESS_TOKEN with your actual authentication token and {tenantname} with the name of your SailPoint tenant.
Note: Ensure your access tokens are always handled securely. Avoid hard-coding them, and consider using environment variables or other secure mechanisms.
The Crucial "yyyyMMddHHmmss'.0Z'" Format
While SailPoint's documentation provides details on various date formats, it notably omits the specific syntax yyyyMMddHHmmss'.0Z'. This format is crucial for several applications demanding an exact date-time representation in a universally comprehensible structure.
Highlights of this format include:
- Universal Recognition: Easily deciphered by both humans and machines.
- Consistency Across Platforms: Promotes uniformity across different systems, simplifying integrations.
- Timezone Clarity: The appended 'Z' denotes Zulu time (UTC), ensuring the timestamp is always paired with pertinent timezone data.
It's pivotal to recognize that although SailPoint doesn't explicitly document this format, it is rooted in the Java SimpleDateFormat, which underpins SailPoint's date transformations.
Conclusion
SailPoint's API brims with extensive capabilities, one of which is the custom date transformations. Even if certain formats like yyyyMMddHHmmss'.0Z' are not enumerated in SailPoint's official documentation, a good grasp of the foundational Java SimpleDateFormat can arm users with the confidence to utilize these custom formats.