Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Error in create Ticket json

Sitarasmi
Regular Contributor
Regular Contributor

Hi Team,

We are trying to generate ticket and using REST connection. PFB code below

{ "call":
[{
"name": "Call1",
"connection": "userAuth",
"url": "xxx"
,
"httpMethod": "POST",
"httpContentType": "application/json",
"httpHeaders": { "x-apikey": "XXX" },
"responseColsToPropsMap": { "custom property11": "call1.message.TicketNo~#~char" },
"httpParams": "{\"ServiceName\":\"SR_LogServiceRequestCatalog\",\"objCommonParameters\":{\"_ProxyDetails\":{\"AuthType\":\"APIKEY\",\"APIKey\":\"xxx\",\"ProxyID\":0,\"ReturnType\":\"JSON\",\"OrgID\":1},\"SR_TicketParame\":{\"Instance\":\"IT\",\"ServiceCatalogName\":\"Query\",\"RequesterEmailID\":\"xxx\",\"SRRemarks\":\"{${if(task.tasktype==1){'Please check & assign required terminal server to the user based on Source Name'}else if(task.tasktype==3){'Hi Team,Please check & assign required terminal server access to the new joiner based on Source Name'} else{}},\"Display Name\":\"${user.displayname}\",\"Source Name\":\"${user.customproperty6}\",\"RBAC
Role\":\"${user.customproperty4}\"},\"LoggedByEmailID\":\"xxx\",\"CustomFields\":[]},\"RequestType\": \"RemoteCall\"}}", "ticketidPath": "TicketNo", "unsuccessResponses": { "message": "" }
}]
}

Getting JSON parser error, unable to figure it out.  Can anyone please check & suggest.

Thanks,

Sitarasmi

2 REPLIES 2

naveenss
All-Star
All-Star

Hi @Sitarasmi please find the sample JSON below

https://docs.saviyntcloud.com/bundle/Dev-Handbook-REST-v24x/page/Content/Developers-Handbook.htm#tic... 

 

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.

rushikeshvartak
All-Star
All-Star

{
"call": [
{
"name": "Call1",
"connection": "userAuth",
"url": "xxx",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpHeaders": {
"x-apikey": "XXX"
},
"responseColsToPropsMap": {
"customproperty11": "call1.message.TicketNo~#~char"
},
"httpParams": {
"ServiceName": "SR_LogServiceRequestCatalog",
"objCommonParameters": {
"_ProxyDetails": {
"AuthType": "APIKEY",
"APIKey": "xxx",
"ProxyID": 0,
"ReturnType": "JSON",
"OrgID": 1
},
"SR_TicketParame": {
"Instance": "IT",
"ServiceCatalogName": "Query",
"RequesterEmailID": "xxx",
"SRRemarks": "${if(task.tasktype==1){'Please check & assign required terminal server to the user based on Source Name'}else if(task.tasktype==3){'Hi Team,Please check & assign required terminal server access to the new joiner based on Source Name'} else{}}",
"DisplayName": "${user.displayname}",
"SourceName": "${user.customproperty6}",
"RBACRole": "${user.customproperty4}"
},
"LoggedByEmailID": "xxx",
"CustomFields": []
},
"RequestType": "RemoteCall"
},
"ticketidPath": "TicketNo",
"unsuccessResponses": {
"message": ""
}
}
]
}


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.