Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/17/2024 08:06 AM - last edited on 05/19/2024 10:51 PM by Sunil
Hi,
Can anyone let me know whats wrong with my JSOn.
{
"accountIdPath": "call1.message.user[0].userName",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://removed.com/profile/v4/Users ",
"httpMethod": "POST",
"httpParams": "{\"user\":[{\"email\": \"${user.email}\",\"userName\":\"${user.userName}\",\"FIRST_NAME\": \"${user.firstname}\",\"LAST_NAME\": \"${user.lastname}\",\"ORG_UNIT_4\":\"US\", \"ORG_UNIT_2\": \"E0119\",\"ORG_UNIT_1\": \"(001)001-US Tech\",\"lEDGER_KEY\": \"LEDGER\",\"Custom21\":\"US\",\"employeeNumber\":\"${user.email}\",\"Custom20\": \"(001)001-US Tech\",\"path\": \"urn:ietf:params:scim:schemas:extension:spend:2.0:Role:roles\",
"value": [
{
"roleName": "EXP_USER"
},
{
"roleName": "EXP_APPROVER"
},
{
"roleName": "STATEMENT_APPROVER"
},
{
"roleName": "STATEMENT_USER"
}
]}]},
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
500,
501,
502,
503,
504
]
}
}
]
}
I am getting the below error.
[This message has been edited by moderator to mask URL]
05/17/2024 10:12 AM - last edited on 05/20/2024 06:25 AM by Sunil
@Rajatlm10 : Try below JSON, Missed escape characters after Value and closing quotes for httpParams block
{
"accountIdPath": "call1.message.user[0].userName",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://removed.com/profile/v4/Users",
"httpMethod": "POST",
"httpParams": "{\"user\":[{\"email\": \"${user.email}\",\"userName\":\"${user.userName}\",\"FIRST_NAME\": \"${user.firstname}\",\"LAST_NAME\": \"${user.lastname}\",\"ORG_UNIT_4\":\"US\", \"ORG_UNIT_2\": \"E0119\",\"ORG_UNIT_1\": \"(001)001-US Tech\",\"lEDGER_KEY\": \"LEDGER\",\"Custom21\":\"US\",\"employeeNumber\":\"${user.email}\",\"Custom20\": \"(001)001-US Tech\",\"path\": \"urn:ietf:params:scim:schemas:extension:spend:2.0:Role:roles\",\"value\": [{\"roleName\": \"EXP_USER\"},{\"roleName\": \"EXP_APPROVER\"},{\"roleName\": \"STATEMENT_APPROVER\"},{\"roleName\": \"STATEMENT_USER\"}]}]}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
500,
501,
502,
503,
504
]
}
}
]
}
05/19/2024 10:24 AM - last edited on 05/20/2024 06:25 AM by Sunil
{
"accountIdPath": "call1.message.user[0].userName",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://removed.com/profile/v4/Users ",
"httpMethod": "POST",
"httpParams": "{\"user\":[{\"email\": \"${user.email}\",\"userName\":\"${user.userName}\",\"FIRST_NAME\": \"${user.firstname}\",\"LAST_NAME\": \"${user.lastname}\",\"ORG_UNIT_4\":\"US\",\"ORG_UNIT_2\": \"E0119\",\"ORG_UNIT_1\": \"(001)001-US Tech\",\"lEDGER_KEY\": \"LEDGER\",\"Custom21\":\"US\",\"employeeNumber\":\"${user.email}\",\"Custom20\": \"(001)001-US Tech\",\"path\": \"urn:ietf:params:scim:schemas:extension:spend:2.0:Role:roles\",\"value\": [{\"roleName\": \"EXP_USER\"},{\"roleName\": \"EXP_APPROVER\"},{\"roleName\": \"STATEMENT_APPROVER\"},{\"roleName\": \"STATEMENT_USER\"}]}]}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
500,
501,
502,
503,
504
]
}
}
]
}