Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract group members from API payload

Stephen Walters
Contributor
January 31, 2022

Hello,

I have managed to query one of the groups Im interested in using an API

I have received data back and managed to attach the payload to the email and send, so far so good :-)

The payload is way more data than I am after in it, I just want the group members names the rest I am not interested in, I have spent a few hours reading up and to be honest I noticed pretty quickly that I was not really making any progress , so here i am asking for any help I can get, if anyone has any ideas on how to do this I would be very great full :-)

 

Thank you all

1 answer

0 votes
Pramodh M
Community Champion
January 31, 2022

Hi @Stephen Walters

Use JQ Tool or Python to extract the data you only require

JQ reference here

https://stedolan.github.io/jq/tutorial/

Let me know the JSON response, I will try helping in extracting the data!!

Thanks,
Pramodh

Stephen Walters
Contributor
February 2, 2022

Hi @Pramodh M 

Apologies for the late reply and thanks for the suggestions, I looked into the JQ tool but it doesn't look like the right tool for me, I would like to keep this in jira automation if I can, just trying to keep it as clean as possible if I can.

Anyway I still have the automation that works and the payload basically returns everything, I am currently using this smart value {{webResponse.body}} in the email which sends everything in the payload after reading a little further it mentions the ability to be able to access the other values if the body of the payload is a JSON object which I believe it is, the other value is displayName so when I add it to the smart value {{webResponse.body.displayName}} it sends an email with nothing in it

Payload.jpg

once again any suggestions are welcome and thanks again for your reply :-)

Suggest an answer

Log in or Sign up to answer