Create
Operations for Networks supports token based authentication. Tokens are non-modifiable identifiers returned by the system when the user has successfully authenticated using valid credentials. Token expires after expiry time returned in the response. All API requests must provide the auth token in Authorization header in following format:
Authorization : NetworkInsight {token}
If a token is invalid or expired, 401-Unauthorized error gets returned in the response of the API request.
There is limit of 100 valid tokens per user and further requests will return 401-Unauthorized. So, users are advised to delete the tokens after use
Expired tokens are cleaned periodically by the system.
Authorization : NetworkInsight {token}
If a token is invalid or expired, 401-Unauthorized error gets returned in the response of the API request.
There is limit of 100 valid tokens per user and further requests will return 401-Unauthorized. So, users are advised to delete the tokens after use
Expired tokens are cleaned periodically by the system.
Request
URI
POST
https://{api_host}/api/ni/auth/token
COPY
Request Body
User Credentials
UserCredential
of type(s)
application/json
Required
{
"username": "[email protected]",
"password": "password",
"domain": {
"domain_type": "LDAP",
"value": "example.com"
}
}
string
username
Optional
username
string
password
Optional
password
object
domain
Optional
domain
Responses
200
Success
Returns
Token
of type(s)
application/json
"Token Object"
string
token
Optional
token
integer As int64
As int64
expiry
Optional
expiry epoch time in secs.
400
Bad Request
Returns
ApiError
of type(s)
application/json
"ApiError Object"
integer As int32
As int32
code
Optional
code
string
message
Optional
message
array of
object
details
Optional
details
401
Unauthorized
Operation doesn't return any data structure
500
Internal Error
Operation doesn't return any data structure
Code Samples
COPY
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/api/ni/auth/token
Authentication Operations
POST
Create
DELETE
Delete
POST
Create Vidm User Token
GET
Get Vidm Oauth Clien Id