Login

Login

Compatibility: from Durst Analytics v1.4.0

There are two options to fetch the "x-auth-token": 

Within the HTTP Response Header a "x-auth-token" is returned:

"x-auth-token": "eyJzdWIiOiJhZG1pbiIsInJVtVXNlciI6ZmFsc2UsImV4cCI6MTYwNTk1MplnKyxYVkMUA..."

Hand over the corresponding parameter in the http header ("x-auth-token") for all api calls:

--header 'x-auth-token: eyJzdWIiOiJhZG1pbiIsInJVtVXNlciI6ZmFsc2UsImV4cCI6MTYwNTk1MplnKyxYVkMUA...'

The token is valid until Analytics is restarted or for 10 days. 

Within the HTTP Response Body a "xAuthToken" is returned:

Hand over the token in the http header ("x-auth-token") for all api calls:

--header 'x-auth-token: eyJzdWIiOiJhZG1pbiIsInJVtVXNlciI6ZmFsc2UsImV4cCI6MTYwNTk1MplnKyxYVkMUA...'

The token is valid until Analytics is restarted or for 10 days. 

GET /api/v1/login

1. Parameters

1.1. Request

Type
Name
Description
Schema
Query
password required
The Password string
Query
username required
The Username string

1.2. Response

Type
Name
Description
Schema
Body username required
The Username string
Body
xAuthToken required
The Token to be used in the HTTP Header as x-auth-token for all following Requests
string
Body
x_auth_token required
The Token to be used in the HTTP Header as x-auth-token for all following Requests (from Version 1.6)
string
Header x-auth-token required
The Token to be used in the HTTP Header as x-auth-token for all following Requests
string

2. Responses

HTTP Code Description Schema
200 OK User
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

3. Produces

*/*

4. Example HTTP Request

Request path

/api/v1/login?password=string&username=string

5. Example HTTP Response

Response 200

{
  "userName": "user",
  "xAuthToken":"eyJzdWIiOiJhZG1pbiIsInJVtVXNlciI6ZmFsc2UsImV4cCI6MTYwNTk1MplnKyxYVkMUA...",
  "x_auth_token":"eyJzdWIiOiJhZG1pbiIsInJVtVXNlciI6ZmFsc2UsImV4cCI6MTYwNTk1MplnKyxYVkMUA..."
}