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!
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
Oh, that's actually what I was searching for but I couldn't remember the magic word "myself". Thank you for adding that!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Greetings
Philipp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wanted to get the value of cookie "cloud.session.token", which I can use in subsequent REST API calls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.