and more in a single search tool across platforms. Read the announcement here. |
01/02/2024 08:22 AM - edited 01/02/2024 08:36 AM
Hi Team,
i am trying to create a ticket using a service desk connection. i have 2 API calls and i want to read headers from call1 to call2.
i have followed the Rest documentation for create Ticket json. I have tried couple of options but didnt worked:
https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm
"ticketidPath": "response.headers.get('Location')",
{
"ticketidPath": "response.call2.message.logout",
"call": [
{
"name": "call1",
"connection": "test",
"url": "https://adadfd:38080/baocdp/rest/login",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpHeaders": {
"Content-Type": "application/json"
},
"httpParams": "{\"username\":\"sss\",\"password\": \"y1\"}"
},
{
"name": "call2",
"connection": "test",
"url": "https://adadfd:38080/baocdp/rest/logout",
"httpMethod": "POST",
"httpParams": "{}",
"httpContentType": "application/json",
"httpHeaders": {
"Authentication-Token": "response.call1.headers.get('Authentication-Token')"
}
}
]
}
CALL 1 response
Response Headers:
Status Code: 200 OK
Authentication-Token: AQIC5wM2LY4SfcwENnXQHu8dxXuIS3Yfzg8AWT4YpEu4sqA.*AAJTSQACMDIAAlNLAAoxNDI3OTI3NjAxAAJTMQACMDE.*
Content-Type: application/json;charset=UTF-8
Date: Wed, 27 May 2015 13:38:04 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Response Body:
{
"login":"true"
}
01/02/2024 09:48 AM
{
"ticketidPath": "response.call2.message.logout",
"call": [
{
"name": "call1",
"connection": "test",
"url": "https://adadfd:38080/baocdp/rest/login",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpHeaders": {
"Content-Type": "application/json"
},
"httpParams": "{\"username\":\"sss\",\"password\": \"y1\"}"
},
{
"name": "call2",
"connection": "test",
"url": "https://adadfd:38080/baocdp/rest/logout",
"httpMethod": "POST",
"httpParams": "{}",
"httpContentType": "application/json",
"httpHeaders": {
"Authentication-Token": "response.call1?fields=values('Authentication-Token')"
}
}
]
}