Log in to get an authentication token

Use this API call to get an authentication token and start a session.

Resource Information

Method

URL

Required authentication

POST

base_url/V1/Session

No

Tip: The base URL is http(s)://<IP address of your NetBrain Web API Server>/ServicesAPI/API.

Parameters

Name

Description

Example

body *required
(body)

The body contains two parameters:

username*(string): the username to log into your NetBrain domain.

password*(string): the password to log into your NetBrain domain.

authentication_id (string): the authentication ID of an external user through SSO, LDAP/AD or TACACS. This parameter is only required for an external user and the value is alias.

{
  "username""NetBrain",
  "password""NetBrain"
}

Note: The content type that NetBrain APIs support is application/json.

Response

Parameter

Type

Description

Example

token

string

The returned authentication token.

{
  "token""301ebdd8-0045-429d-8807-c51b8db7f5f0",
  "statusCode""790200",
  "statusDescription""Success"
}

statusCode

integer

The returned status code of executing the API.

statusDescription

string

The explanation of the status code.

After receiving a token, associate your session with a tenant ID and domain ID. To find your tenant and domain ID, call APIs to get a list of tenants and domains that can be used.