Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Multiple Rest API's

Vipul
New Contributor II
New Contributor II

Hi
I have a use case where I want to make two API calls for creating an account in Saviynt. The first call will create an account, and the second will update the attribute of the account. I have created the below JSON for it. However, it keeps giving an error during the second API call.

I have tried other syntaxes as well, but they are not working.
${account.name}
${account.accountID}
${accountID}
${accountName}

JSON:

{
"showLogs": true,
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"deleteLinks": false,
"accountThresholdValue": 100,
"correlateInactiveAccounts": true,
"inactivateAccountsNotInFile": false,
"deleteAccEntForActiveAccounts": false
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxxxxxx/odata/v2/EmpEmployment",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "d.results",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "userId~#~char",
"name": "userId~#~char",
"customproperty1": "personIdExternal~#~char",
"customproperty22": "lastDateWorked~#~date"
},
"disableDeletedAccounts": false
},
"call2": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"url": "https://xxxxxxxxxxxx/odata/v2/User(${accountName})?$select=isPrimaryAssignment,userId&$format=json",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"inputParams": {
"dependentCall": true
},
"listField": "d",
"keyField": "accountID",
"nextApiKeyField": "accountID",
"colsToPropsMap": {
"accountID": "userId~#~char",
"name": "userId~#~char",
"customproperty3": "isPrimaryAssignment~#~char"
},
"disableDeletedAccounts": false
}
}
}
}

 

 

ERROR:  

Vipul_0-1721826064478.png

 

[This post has been edited by a Moderator to remove sensitive information.]

13 REPLIES 13

rushikeshvartak
All-Star
All-Star

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Vipul
New Contributor II
New Contributor II

This is for importing an account in Saviynt.

The issue is when I use the ${accountName} under the dependent API call, Saviynt is not able to recognize it and gives an illegal character error. If I replace it with a hardcoded value, it works fine. Even in Postman, it works fine.
https://xxxxxxxxxxxxxxxxxxxxxxxxxx/odata/v2/User(${accountName})?$select=isPrimaryAssignment,userId&...

 

Share logs in text file


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Vipul
New Contributor II
New Contributor II

Attached the logs

Refer https://docs.saviyntcloud.com/bundle/SAPSF-v24x/page/Content/Configuring-Connection.htm 

Try below JSON

{
  "showLogs": true,
  "accountParams": {
    "connection": "userAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "deleteLinks": false,
      "accountThresholdValue": 100,
      "correlateInactiveAccounts": true,
      "inactivateAccountsNotInFile": false    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "https://xxxxxxxx/odata/v2/EmpEmployment",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "listField": "d.results",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "userId~#~char",
          "name": "userId~#~char",
          "customproperty1": "personIdExternal~#~char",
          "customproperty22": "lastDateWorked~#~date"
        },
        "disableDeletedAccounts": false
      },
      "call2": {
        "callOrder": 1,
        "stageNumber": 1,
        "http": {
          "url": "https://xxxxxxxxxxxx/odata/v2/User%28${accountName}%29?$select=isPrimaryAssignment,userId&$format=json",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "inputParams": {
          "dependentCall": true
        },
        "listField": "d",
        "keyField": "accountID",
        "nextApiKeyField": "accountID",
        "colsToPropsMap": {
          "accountID": "userId~#~char",
          "name": "userId~#~char",
          "customproperty3": "isPrimaryAssignment~#~char"
        },
        "disableDeletedAccounts": false
      }
    }
  }
}

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Vipul_0-1721819966841.png

Getting the same error with the above JSON as well.

 

{
  "showLogs": true,
  "accountParams": {
    "connection": "userAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "deleteLinks": false,
      "accountThresholdValue": 100,
      "correlateInactiveAccounts": true,
      "inactivateAccountsNotInFile": false
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "https://xxxxxxxx/odata/v2/EmpEmployment",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "listField": "d.results",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "userId~#~char",
          "name": "userId~#~char",
          "customproperty1": "personIdExternal~#~char",
          "customproperty22": "lastDateWorked~#~date"
        },
        "disableDeletedAccounts": false
      },
      "call2": {
        "callOrder": 1,
        "stageNumber": 1,
        "http": {
          "url": "https://xxxxxxxxxxxx/odata/v2/User/\\${accountName}?$select=isPrimaryAssignment,userId&\\$format=json",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "inputParams": {
          "dependentCall": true
        },
        "listField": "d",
        "keyField": "accountID",
        "nextApiKeyField": "accountID",
        "colsToPropsMap": {
          "accountID": "userId~#~char",
          "name": "userId~#~char",
          "customproperty3": "isPrimaryAssignment~#~char"
        },
        "disableDeletedAccounts": false
      }
    }
  }
}

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Vipul_0-1721900564599.png

I'm getting the same error with this one as well.

 

NM
Honored Contributor II
Honored Contributor II

Hi @Vipul you don't have to add %28 

Use this URL

https://xxxxxxxxxxxx/odata/v2/User/${accountName}?\\$select=isPrimaryAssignment,userId&\\$format=json

Vipul
New Contributor II
New Contributor II

This one is also not working, giving a 404 error as the API format is incorrect. I have added a screenshot of the error.
If I hard-code the value in the API rather than using ${accountName}, it works fine.
This is the harcoded API and works fine in Saviynt: https://xxxxxxxxxxxxxxxxxxxx/odata/v2/User(101009)?$select=isPrimaryAssignment,userId&$format=json&$...

We have to pass the userid in the round brackets, otherwise, it won't work.

Vipul_1-1721901197275.png

 

Hi @Vipul can you try the url with the below format?

"url": "https://xxxxxxxxxxxx/odata/v2/User/\"(${accountName})\"?$select=isPrimaryAssignment,userId&\\$format=json"
Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

Vipul
New Contributor II
New Contributor II

Getting the same error as the Illegal character.

Vipul_0-1721919754923.png

 

NM
Honored Contributor II
Honored Contributor II

Hi @Vipul , 

Use this URL

https://xxxxxxxxxxxx/odata/v2/User/${accountName}?\\$select=isPrimaryAssignment,userId&\\$format=json

Share complete logs if in case it fails.