Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Create new user session

Creates a new session for a user in Jira. Once a session has been successfully created it can be used to access any of Jira’s remote APIs and also the web UI by passing the appropriate HTTP Cookie header. Note that it is generally preferrable to use HTTP BASIC authentication with the REST API. However, this resource may be used to mimic the behaviour of Jira’s log-in page (e.g. to display log-in errors to a user).

POST/auth/1/session
Authorization
AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

Request body
requiredapplication/json

the username and password to authenticate

passwordstring
usernamestring
Responses
200

Returned if the caller is authenticated. Contains information about the caller's session.

loginInfoLoginInfo
Show properties
failedLoginCountinteger<int64>
lastFailedLoginTimestring<date-time>
loginCountinteger<int64>
previousLoginTimestring<date-time>
sessionSessionInfo
Show properties
namestring
valuestring
401

Returned if the login fails due to invalid credentials.

403

Returned if the login is denied due to a CAPTCHA requirement, throtting, or any other reason. In case of a 403 status code it is possible that the supplied credentials are valid but the user is not allowed to log in at this point in time.

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'http://jira.example.com/rest/auth/1/session' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "password": "string",
  "username": "string"
}'
Response
{
  "loginInfo": {
    "failedLoginCount": 10,
    "lastFailedLoginTime": "2019-08-24T14:15:22Z",
    "loginCount": 127,
    "previousLoginTime": "2019-08-24T14:15:22Z"
  },
  "session": {
    "name": "JSESSIONID",
    "value": "12345678901234567890"
  }
}

Was this page helpful?