and more in a single search tool across platforms. Read the announcement here. |
03/18/2024 01:26 PM - edited 03/18/2024 02:42 PM
Hi Team,
Below json body is working fine from postman. However i am getting following error
JSON:
{\"login\":\"ddf@sf.org\",\"email\":\"ddf@sf.org\",\"firstname\":\"test\",\"lastname\":\"test 05\",\"fullname\":\"test test 05\",\"employee-number\":\"136469\",\"active\":\"true\",\"authentication-method\":\"saml\",\"sso-identifier\":\"ddf@sf.org\",\"manager\":{\"login\":\"ddf@sf.org\"},\"default-address\":{\"street1\":\"529 Main Street\",\"city\":\"Charlestown\",\"state\":\"MA\",\"postal-code\":\"02129\",\"active\":\"true\",\"country\":{\"code\":\"US\"}},\"default-account\":{\"code\":\"01-342\",\"segment-1\":\"01\",\"segment-2\":\"342\"}},\"default-account-type\":{\"name\":\"fddd\",\"currency\":{\"code\":\"USD\"}},\"default-currency\":{\"code\":\"USD\"},\"requisition-approval-limit\":{\"amount\":\"7868\",\"currency\":{\"code\":\"USD\"}},\"invoice-approval-limit\":{\"amount\":\"10000\",\"currency\":{\"code\":\"USD\"}},\"requisition-self-approval-limit\":{\"amount\":\"1000\",\"currency\":{\"code\":\"USD\"}}}
03/18/2024 04:53 PM
Please share full json
03/18/2024 06:30 PM
Hey, that is full JSON
03/18/2024 08:11 PM
In Saviynt in JSON block its used?
03/18/2024 10:13 PM
Create and update
03/18/2024 10:20 PM
JSON syntax is wrong
Sample
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"displayName": "call1.message.id~#~char"
},
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "<TENANT URL>/api/v2/agents",
"httpMethod": "POST",
"httpParams": "{\"name\":\"${arsTasks?.accountName}\",\"email\":\"${user.email}\",\"ticket_scope\":1,\"language\":\"en\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
}
}
]
}
03/18/2024 10:28 PM
@rushikeshvartak I have this well formatted according to saviynt Jsons.
After all that am getting above error message.
Basically what I observed is if I want to pass even a simple json object of objects am getting this error. With a plain json it's working.
Giving above error for even below simple json
JSON:
{
"login": "ddf@sf.org",
"email": "ddf@sf.org",
"firstname": "test",
"lastname": "test 05",
"fullname": "test test 05",
"employee-number": "13649",
"active": true,
"authentication-method": "saml",
"sso-identifier": "ddf@sf.org",
"manager": {
"login": "sdfsdf@xxxx.org"
}}
And working fine for:.
JSON:
{
"login": "ddf@sf.org",
"email": "ddf@sf.org",
"firstname": "test",
"lastname": "test 05",
"fullname": "test test 05",
"employee-number": "13649",
"active": true,
"authentication-method": "saml",
"sso-identifier": "ddf@sf.org"
}
03/18/2024 10:33 PM
Error may not be related to httparams hence need full saviynt format JSON
03/19/2024 07:38 AM - edited 03/19/2024 08:01 AM
NOT WORKING:
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"displayName": "call1.message.fullname~#~char",
"name": "call1.message.login~#~char",
"customproperty1": "call1.message.email~#~char",
"customproperty2": "call1.message.firstname~#~char",
"customproperty3": "call1.message.lastName~#~char"},
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://xxxx.com/api/users/",
"httpMethod": "POST",
"httpParams": "{\"login\":\"${user.email}\",\"email\":\"${user.email}\",\"firstname\":\"${user.firstname}\",\"lastname\":\"${user.lastname}\",\"fullname\":\"${user.firstname} ${user.lastname}\",\"employee-number\":\"${user.employeeid}\",\"active\":true,\"authentication-method\":\"saml\",\"sso-identifier\":\"${user.email}\",\"manager\":{\"login\":\"${userManager.email}\"}}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,200
]
}
}
]
}
WORKING:
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"displayName": "call1.message.fullname~#~char",
"name": "call1.message.login~#~char",
"customproperty1": "call1.message.email~#~char",
"customproperty2": "call1.message.firstname~#~char",
"customproperty3": "call1.message.lastName~#~char"},
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://xxxx/api/users/",
"httpMethod": "POST",
"httpParams": "{\"login\":\"${user.email}\",\"email\":\"${user.email}\",\"firstname\":\"${user.firstname}\",\"lastname\":\"${user.lastname}\",\"fullname\":\"${user.firstname} ${user.lastname}\",\"employee-number\":\"${user.employeeid}\",\"active\":true,\"authentication-method\":\"saml\",\"sso-identifier\":\"${user.email}\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,200
]
}
}
]
}