5.4.1 Login
- Description
-
Logs in to the Intelligent Integrated Management Base according to the specified request.
- Execution permissions
-
-
JP1_Console_Admin
-
JP1_Console_Operator
-
JP1_Console_User
-
- API version
-
v1
- Format
-
- Request line
POST /application/component/apiVersion/login/ httpVersion
- Request message body
{ "user":user-name, "password":password }
- Response message body
{ "jp1user":JP1-user, "jp1token":JP1-authentication-token, "token":Authorization-header-authentication-token, "clientId":client-ID, "permissions":[ JP1-user-permissions, ... ] }
- Parameters
-
- user
-
Specify the user name as a string value.
- password
-
Specify the password as a string value.
- Status codes
-
The following table describes the status codes that are returned as a response to the request.
Status code
Message
Description
200
--
The login succeeded.
403
KAJY52001-E
The login failed due to an invalid parameter.
KAJY52002-E
Could not communicate with the server that stores authentication data.
KAJY52003-E
The login failed due to an internal error.
KAJY52004-E
There is no permission to log in.
For details on the messages, see the manual JP1/Integrated Management 2 - Manager Messages.
- Return values
-
The following information is returned in the response header:
Parameter name
Description
Set-Cookie
Cookie string
The following information is returned in the response body if the status code is 200:
No.
Member name
Data type
Description
1
jp1user
string
The JP1 user name
2
jp1token
string
The JP1 authentication token
3
token
string
The authentication token for the Authorization header
4
clientId
string
The identifier to identify the client uniquely
5
permissions
array
An array of JP1 permission strings
The following exception object is returned in the response message body if the status code is not 200:
No.
Member name
Data type
Description
1
returnCode
string
Detailed reason code
- Examples
-
- Example of invoking the login API
POST http://hostname:xxxxx/im/api/v1/login HTTP/1.1 { "user": "jp1admin", "password":"password" }
- Example of a response to the login API
HTTP/1.1 200 OK Set-Cookie: JSESSIONID=7F2FB43CF4829025661D9E139E911B3B { "jp1user": "jp1admin", "jp1token": "MGFkMmM2M2UwMDE4XzI3XzA4OjI0OjMzX19fX19fX19fX19fX19fX2pwMWFkbWluICAgICAgICAgICAgICAgICAgICAgICAg", "token": "anAxYWRtaW46TUdGa01tTTJNMlV3TURFNFh6STNYekE0T2pJME9qTXpYMTlmWDE5ZlgxOWZYMTlmWDE5ZlgycHdNV0ZrYldsdUlDQWdJQ0FnSUNBZ0lDQWdJQ0FnSUNB Z0lDQWdJQ0Fn", "clientId": "02157e39-2248-4a0e-8b63-78ffb4296e28", "permissions": { "*": [/*omitted*/] } }