Hi,
I want to fetch session information for the logged in user using rest api in Jira Cloud. I tried using folowing end point.
<domain>/jira/rest/auth/1/session, but it is not fetching me the required info. Can you please help?
Thanks!
Hi @Kshitij Nirgude
You're not specific as to what information isn't being returned, but I wonder if you're looking for the "Myself" family of calls:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-myself/#api-group-myself
Hi @Kshitij Nirgude ,which information are you looking for exactly?As REST itself is stateless, there are no session information when interacting with the API.Inofficially there is POST https://$ALIAS.atlassian.net/gateway/api/session/heartbeat which will probably need a cookie as authencation and returns the information "nextCallTimestamp" and "sessionExpiryTime".Maybe this helps. Otherwise, I'm looking forward to hearing what exact information you're looking for and hopefully can help you dig out the correct endpoint for that.GreetingsPhilipp
Oh, that's actually what I was searching for but I couldn't remember the magic word "myself". Thank you for adding that!
I wanted to get the value of cookie "cloud.session.token", which I can use in subsequent REST API calls.
@Kshitij Nirgude your original idea of using <domain>/jira/rest/auth/1/session is correct and should return a session ID suitable for use as a cookie in future API calls.
Is that call not returning the session token you expect in the response headers or payload?
ref: https://developer.atlassian.com/server/jira/platform/cookie-based-authentication/
I would like to get this information for Jira Cloud and not for Jira Server/Data Center. It isn't working for Jira Cloud. Do we have any equivalent url for jira cloud?
It looks like you're new here. Sign in or register to get started.