Authentication
The Authentication REST APIs can be used by an external application to authenticate itself to the DCNM in order to control the Fabric Automation cluster. After calling logon to get the token, all the subsequent REST API requests need to set the DCNM-Token field with the token in the HTTPS header.
By default, the dcnm will support http. For https support, you need to run the command appmgr update dcnm -h true.
The following are the Authentication REST APIs:
Status
The following table details the API Response code, status and, the HTTP methods.
|
|
|
200 |
OK |
GET |
202 |
Accepted |
POST PUT DELETE |
400 |
Bad Request |
GET POST PUT DELETE |
401 |
Unauthorized |
GET POST PUT DELETE |
403 |
Forbidden |
GET POST PUT DELETE |
404 |
Not Found |
GET POST PUT DELETE |
405 |
Method Not Allowed |
GET POST PUT DELETE |
500 |
Internal Server Error |
GET POST PUT DELETE |
Description
Logon to DCNM server to authenticate the user. Once the authentication is complete, a token will be returned as the response. All API calls to the DCNM server should use this token until it is expired or invalid. The logon API uses “username:password” with base64 encoded in https Authorization header. For example, “Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==” will return the token in the payload.
URL
https://dcnm-ip/rest/logon
Parameter
|
|
|
expirationTime |
S |
Token expiry duration. |
Return Value
Format: JSON
Type: Object
|
|
|
Dcnm-Token |
S |
Details of the token. |
Description
Logout from the DCNM server. Once you have logged out, the token will be invalid. You must set the token in the Authorization header while using this API.
URL
https://dcnm-ip/rest/logout
Return Value
Format: JSON
Type: Object
Resource Name
/rest/dcnm-version
Description
Get the installed DCNM version.
URL
https://dcnm-ip/rest/dcnm-version
Return Value
Format: JSON
Type: Object
|
|
|
Dcnm-Version |
S |
Get DCNM version. |