JSON Webhok task

Below is the scenario for “webhook: json webhook” task in XLR.

URL: https://localhost:5516/api/v1/templates?title=mytemplatetitle
HTTP method: GET

This task executes fine.(http status:200)

But when I try to capture any particular value of the json query by putting in “json path expression” it throws error.

here’s an example:

JSON Path Expression 1: id

Error:
Http Status: 200 Expression id did not match anything in the response Exception during execution: SystemExit: 1 in <script> at line number 61

NOTE: Actual response contains the key “id”. Below is part of json response through postman.

`[
{
    "id": "Applications/Foldercffa427cd2414d8a865a87ea50d638d9/Release7fcefc1b8c7143888c3304a41cf656",
    `

Kindly suggest.

Hi Team,

Can someone help on above query?

Thanks.

what you get fromhttps://localhost:5516/api/v1/templates?title=mytemplatetitle query is an array of templates, what your json path expression should look like is something like $[0].id

1 Like

Hi Jan,

Thanks a lot for your reply and explaning the root cause of the issue.

It works when I put “json path expression” as $[0].id

Thank You!