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.

Need help for Connection JSON for REST connector

navneetv
Regular Contributor II
Regular Contributor II

Hi Everyone

Need your help with connection JSON. We have an application, which we want to onboard however it has a different type of authorization. it has a hardcode authorization value which needs to enter in the HTTP header. i am attaching a screenshot of Postman.  I tried to build the connection JSON but looks like it is not working 

navneetv_0-1685800469604.png

 

Connection JSON

{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"URL": "<controlM URL>",
"httpMethod": "GET",
"httpHeaders": {
"contentType": "application/json"
},
"httpContentType": "application/json",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"timeOutError": "Read timed out",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "API-key",
"accessToken": "<I enter the API token here>***********",
"apiRateLimitConfig": {
"retryAfterCalls": 2000,
"retryWaitSeconds": 60
}
}
 
}
}
 
can anyone suggest what I am doing wrong here?

 

4 REPLIES 4

nimitdave
Saviynt Employee
Saviynt Employee

Please try with below:

{
"authentications":
{
"acctAuth":
{
"authType": "Basic",
"httpHeaders":
{
"x-api-key": "<enter api here>",
"contentType": "application/json"
},
"authError":
[
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"errorPath": "error",
"retryFailureStatusCode": [401],
"maxRefreshTryCount": 5
}
}
}

************************************************************************************

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountThresholdValue": 3000,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"connection": "acctAuth",
"makeProcessingStatus": false,
"disableDeletedAccounts": false,
"http": {
"url": "url here",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpHeaders": {
"x-api-key": "<enter api key here>",
"Accept": "application/json"
}
},
"listField": "users",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "userId~#~char",
"name": "userId~#~char",
"displayName": "userId~#~char",
"customproperty1": "isActive~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"Role": {
"listPath": "userRoles",
"idPath": "role",
"keyField": "entitlementID"
}
}
}
}

navneetv
Regular Contributor II
Regular Contributor II

Hi Nimitdave,

thankyou for helping with it and sorry to ask lots of questions and help. Since I started learning therefore still i am understanding the rest connection function and their JSON 

I am getting errors while running the job. could you please suggest, what I am doing wrong? 

navneetv_0-1685891552754.png

Here is AccountImport JSON , I am using it

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"inactivateAccountsNotInFile": false
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://rc-ctlm-sbx-aapi.us1.controlm.com/automation-api/config/authorization/users",
"httpHeaders": {
"x-api-key": "<I entered API key>",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "result",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "name~#~char",
"name": "name~#~char",
"status": "status~#~char",
"customproperty1": "name~#~char",
"customproperty2": "status~#~char",
"customproperty3": "memberof~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"Role": {
"importAsEntitlement": false,
"listPath": "",
"idPath": "roleId",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Role": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://rc-ctlm-sbx-aapi.us1.controlm.com/automation-api/config/authorization/roles",
"httpHeaders": {
"x-api-key": "<I entered API key>",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "name~#~char",
"entitlement_value": "name~#~char",
"Description": "Description~#~char"
},
"disableDeletedEntitlements": "true"
}
}
}
}
},
"acctEntParams": {
"entTypes": {
"Role": {
"call": {
"call1": {
"processingType": "acctToEntMapping"
}
}
}
}
}
}

 

here is POSTMAN response body, where you can see, the path is not there. then what listField" should in Accountimport JSON

navneetv_1-1685891755191.png

 

nimitdave
Saviynt Employee
Saviynt Employee

@navneetv this is done right. I remember replying on another forum ticket 

navneetv
Regular Contributor II
Regular Contributor II

Hi Saviynt Team,

Thank you Nimit for helping with it. You fixed almost everything. I posted another thing and it was resolved too. You guys are awesome