I am wanting to save the ID numbers returned from an API call into a Single Smart Value. I then want to reference each ID in the smartvalue to use in future outgoing web requests for automation.
I start by using this
GET: https://<<domain>>.atlassian.net/rest/api/3/dashboard/<<dashboardid>>/gadget
Which successfully returns the following response:
I wasn't able to figure out how to grab any of the indexed values of my JsonArray, however, I was able to completely change my method and instead of defining 1 smart value as an array, I grabbed each id and saved it as a variable independently. This was a huge pain but it works....
If someone figures out how to reference the value in a jsonArray via a smartvalue method, please let me know!!
Thanks :)
In my testing I was able to successfully create a smartvalue {{itemIds}} by using the following:
{{webResponse.body.gadgets.id.asJsonArray}}
which returns:
[13715,13716,13717,14950,13718,13719,13714,13960]
Now I just need to figure out how to reference each of those values independently with a SmartValue function.. like.
{{itemIds.get(0)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.