The Authentication API accepts the same user credentials as the Waterline Data browser. These API calls control the creation and destruction of a session cookie to validate other API calls.
A POST call to the /login
endpoint creates a login session cookie that is valid for the UI timeout
duration (a default time of 120 minutes).
media type | data type | description |
---|---|---|
application/json | Credentials (JSON) | Credentials consist of username and password. |
media type | data type | description |
---|---|---|
application/json | LoginResponse (JSON) | Consists of loginResult, message, and userInfo. |
POST /v2/login
Content-Type: application/json
Accept: application/json
{
"username" : "...",
"password" : "..."
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"loginResult" : "SUCCESS",
"message" : "...",
"userInfo" : {
"username" : "...",
"displayName" : "..."
}
}
Destroys the session cookie and returns a logout confirmation message.
media type | data type | description |
---|---|---|
application/json | LogoutResponse (JSON) | A generic message string stating "User logged out" or "User not logged in". |
GET /v2/logout
Content-Type: application/json
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"redirectUrl" : "...",
"message" : "..."
}