Authenticate user and get access token
Authenticates a user with username/password and returns a token for use in subsequent API calls. Also sets a session cookie.
The returned access token should be included in the Authorization header
for subsequent requests in the format: Authorization: Bearer {token}.
Request
This endpoint expects an object.
username
User's login name
password
User's password
database
Target database name (defaults to system if not specified)
Response
Successfully authenticated
access_token
Access token for subsequent API calls. This token should be included in the
Authorization header for all authenticated requests using the format:
Authorization: Bearer {token}.
status
Status information about the login operation. A successful login will have a SQL state of "00000".
username
The authenticated user's username. This is useful for displaying in UIs or for audit logging purposes.
database
The database that was authenticated against. This is the default database for subsequent queries if none is specified.
expires_in
Number of seconds until the access token expires. Clients should refresh the token before this time to maintain uninterrupted access.
Errors
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error

