REst Connection - To call saviynt API

prachi
New Contributor III
New Contributor III

Hi,

I am working on calling the Saviynt API using a Rest Connector and wants to update the user's attribute.

I have a Analytics report created and when i call the Saviynt API to fetch the result of the report, it will have the username and other attribute mapping. The postman response look like below, where analytics ID is passed in body of the API:

prachi_0-1665834597698.png

My ImportUserJSON looks like :

{
"connection": "acctAuth",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"url": "https://{URL}/ECM/api/v5/fetchControlDetailsES",
"httpMethod": "GETWITHBODY",
"httpParams": "{\"analyticsid\":\"1473\"}",
"httpHeaders": {
"contentType": "application/json",
"Authorization": "${access_token}"
},
"userResponsePath": "result",
"colsToPropsMap": {
"username": "userName~#~char",
"manager": "ownermanagername~#~char"
},
"errorCode":"400",
"errorCodePath":"errorCode"
}

But when i am calling the API from it is giving the below error :

prachi_2-1665834757634.png

 

 

3 REPLIES 3

Sivagami
All-Star
All-Star
@prachi - contentType under httpHeaders is a wrong keyword I believe, try using Content-Type
Try the json below - Remove the strikethrough content .
 
{
"connection": "acctAuth",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"url": "https://{URL}/ECM/api/v5/fetchControlDetailsES",
"httpMethod": "GETWITHBODY",
"httpParams": "{\"analyticsid\":\"1473\"}",
"httpHeaders": {
"contentType": "application/json",
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"userResponsePath": "result",
"colsToPropsMap": {
"username": "userName~#~char",
"manager": "ownermanagername~#~char"
},
"errorCode": "400",
"errorCodePath": "errorCode"
}
 
-Siva

prachi
New Contributor III
New Contributor III

Thanks Sivagami. This helps !!!