Forums

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

How do I extract the session id from the response of the login webhook?

Ruth Ariel June 8, 2020

Hi, I need Help:

I'm using GET webhook by 'Send web request' component in Jira automation.

In it I log in to an external system using a username and password, and then I want to use the session id that is received, for another webhook call that will take action on the external system.

So I need to extract the session id from the response.

 

This expression works fine 

{{webhookResponse.body}}

and it returns the following result:

<?xml version="1.0" encoding="UTF-8" ?> <resp status="ok"> <sessionId>26c25203abbb4f2690e39897c346ef62@240038451</sessionId> </resp>

But then when I try to access the sessionId, it doesn't work

{{webhookResponse.body.sessionId}}

 

Please Help!

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Ruth Ariel June 8, 2020

Ok I just had to add at the end of the url of the login Rest: '&output=json'.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events