Authentication

API operations related to authentication operations, see the Authentication Process section for a detailed description of the authentication flows available.

Get an OAuth2 token

Request
Request Body schema: application/json

Get an OAuth2 token

grant_type
string

Only the Client Credentials grant type is currently supported.

Value: "client_credentials"
auth_id
string
auth_secret
string
Responses
200

Response success

Response Schema: application/json
access_token
string

Bearer token to be set in the Authorization header of all authenticated API requests. See the OAuth specification for more detail.

token_type
string

Only bearer tokens are currently supported.

Value: "bearer"
expires_in
integer

Length of time in seconds that the access_token is valid for before it expores.

scope
string

The authorization scope of the access_token, which determines which API endpoints and operations are accessible. (user and observer scopes are currently not available)

Enum: "observer" "user" "admin"
object (User)
auth_id
string
AccessLevel
string
Enum: "observer" "user" "admin"
400

Malformed request.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden. Current token does not have the necessary authority for the operation.

422

Invalid data was sent.

post/auth/token
Request samples
application/json
{
  • "grant_type": "client_credentials",
  • "auth_id": "admin",
  • "auth_secret": "password"
}
Response samples
application/json
{
  • "access_token": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
  • "token_type": "bearer",
  • "expires_in": 3600,
  • "scope": "observer",
  • "User": {
    }
}

Obtain a new API Key

SecurityOAuth2 or ApiKey
Responses
200

Response success

Response Schema: application/json
ApiKey
string
401

Unauthorized access, invalid credentials were used.

403

Access forbidden. Current token does not have the necessary authority for the operation.

post/auth/registerApiKey
Request samples
Response samples
application/json
{
  • "ApiKey": "string"
}

Revoke an API key

SecurityOAuth2 or ApiKey
Request
Request Body schema: application/json

Revoke an API key

ApiKey
string
Responses
200

Response success

Response Schema: application/json
status
integer [ 200 .. 202 ]

The HTTP status code.

success
boolean
400

Malformed request.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden. Current token does not have the necessary authority for the operation.

422

Invalid data was sent.

post/auth/revokeApiKey
Request samples
application/json
{
  • "ApiKey": "string"
}
Response samples
application/json
{
  • "status": 200,
  • "success": true
}