Authentication
The Authentication REST APIs can be used by an external application to authenticate itself to the DCNM in order to programmatically control the Unified Fabric 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:
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. |
Status Code
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
500 |
Internal Server Error |
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
Status Code
202 |
Accepted |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
500 |
Internal Server Error |
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. |
Status Code
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
500 |
Internal Server Error |