POST /api/v1/auth

Login and Create a Session

Accepts a request with user credentials, validates credentials, creates a session, and returns an API Token in a Response Header to be used in subsequent requests. The user's profile data is also returned in the body of the response.

Request Parameters

Name Description
username The username of the account.
password The password of the account.

Response Parameters

Name Description
username The programmatic username, usable as the 'owner' attribute for other API requests.
first_name The Given Name of the authenticated User.
last_name The Proper Name of the authenticated User.
email The Email Address of the authenticated User.
last_login The Last time the authenticated User logged in.
date_joined The Date the authenticated User joined.

Examples

Sample Request

PUT:/api/v1/user
            
{
    "first_name": "Thomas"
}
            
        

Sample Response

            
Headers: 
X-BlackSeal-Authorization: APITOKENDATA

Body: 
{
    "username": "tdent",
    "first_name": "Thomas",
    "last_name": "Dent",
    "email":"emailaddress@example.com"
    "last_login":"2015-02-17T17:37:12.400Z",
    "date_joined":"2015-02-17T18:04:16.099Z"
}