Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Rest Connector Query: Issue with Importing Dates

Sivagami
Valued Contributor
Valued Contributor

Hi Team,

I have API's that provide me with the account creation and last logon timestamp.

{
 "Username":"xxx"
 "LastLoginTime": "2021-06-26T03:31:25Z",
 "IsActive": true,
 "CreationTime": "2017-10-16T12:24:34.127Z"
},
{
 "Username":"yyy"
 "LastLoginTime": "2021-06-28T03:31:25Z",
 "IsActive": true,
 "CreationTime": "2017-10-19T12:24:34.127Z"
}

I want to store them to the account attributes (createdon and lastlogondate ) in Saviynt. Hence, my account attributes mapping in rest connector is something like below.

 

"createdon": "CreationTime~#~date",
"lastlogondate": "LastLoginTime~#~date"

I tried defining the dateFormat as well in the json like below, but it didn't help.

"dateFormat": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"

Referred to the rest connector guide, but no luck. Could you give some insights on how I can store the date coming from API in Saviynt account attributes?

-Siva

 

1 REPLY 1

Sivagami
Valued Contributor
Valued Contributor

Below solution worked.

Thanks much, XXXX@saviynt.com. It would be great to have this information posted in the Rest Connector Guide.

 

 

{
  "globalSettings": {
    "dateFormat": "yyyy-MM-dd'T'HH:mm:ss"
  },
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "accountsNotInImportAction": "Suspend",
      "accountThresholdValue": 50000
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "<<URL HERE>>",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "statusConfig": {
          "active": "true",
          "inactive": "false"
        },
        "listField": "value",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "Id~#~char",
          "name": "UserName~#~char",
          "displayname": "FullName~#~char",
          "accounttype": "Type~#~char",
          "created_on": "CreationTime~#~date",
          "lastlogondate": "LastLoginTime~#~date",
          "status": "IsActive~#~char",
          "customproperty1": "RolesList~#~listAsString",
          "customproperty2": "EmailAddress~#~char",
          "customproperty3": "IsEmailConfirmed~#~char",
          "customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
        }
      }
    },
    "acctEntMappings": {
      "Role": {
        "listPath": "RolesList",
        "idPath": "",
        "keyField": "entitlement_value"
      }
    }
  },
  "entitlementParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "entTypes": {
      "Role": {
        "entTypeOrder": 0,
        "call": {
          "call1": {
            "callOrder": 0,
            "stageNumber": 0,
            "http": {
              "url": "<<URL HERE>>",
              "httpHeaders": {
                "Authorization": "${access_token}",
                "Accept": "application/json"
              },
              "httpContentType": "application/json",
              "httpMethod": "GET"
            },
            "listField": "value",
            "keyField": "entitlementID",
            "colsToPropsMap": {
              "entitlementID": "Id~#~char",
              "entitlement_value": "Name~#~char",
              "customproperty1": "DisplayName~#~char",
              "displayname": "DisplayName~#~char",
              "entitlement_glossary": "DisplayName~#~char"
            },
            "disableDeletedEntitlements": true
          }
        }
      }
    }
  },
  "acctEntParams": {
    "processingType": "acctToEntMapping"
  }
}

 

 

 -Siva

[This post has been edited by a moderator to remove personally identifiable information (email) to abide by the Saviynt Community Terms of Use and Participation Guidelines.]