Invoke a sample GET request to fetch the Freshservice ticket details using the WebRequest Node and use the JSON Parser Node to parse the response body and perform actions based on it.


Step1

Use the Web Request node to trigger a sample GET request to fetch the Freshservice ticket details.

Note: We can route the requests to on-premise networks with the help of the Orchestration Server.


Step 2

Test the action and copy the sample response body to the clipboard.


Step 3

To ensure that this request is successful, the status code can be checked for a 2XX response in the condition block.


Step 4

Drag and drop the JSON Parser node onto the canvas.



Step 5

Map the Source to the output of the Web Node Request.


Step 6

Paste the sample response body into the Payload section and hit the Generate Output button to automatically create the outputs based on the schema of the payload input. 


Optional: If you require any other values from the schema at runtime, you can create your outputs with Custom JSON Path expressions. 

E.g.: 1)  From the payload below, to filter just the first asset associated with the ticket, the $.ticket.assets[0] JSON path expression can be used.


Eg: 2) To filter the associated assets name in the ticket that have medium impact, $.ticket.assets[?(@.impact<2)].name JSON path expression can be used.


Step 7

In subsequent conditions and actions, make reference to any outputs defined in the Parser nodes.