Make your first call
In this tutorial, you will learn how to do authentication by using the PowerProtect DDMC system username and password. Then you will use the authenticated token to make your first call to retrieve basic information from the DDMC system.
Log in to PowerProtect DDMC system
With the UI username and password, you can use the Auth API to get the authentication token.
curl --request POST \
--header 'content-type: application/json' \
--url https://<DDMC-SYSTEM-IP/FQDN>:3009/rest/v1.0/auth \
--data '{"username":"<your-user-name>","password":"<your-password>"}'
Sample response:
Response code: Created(201)
X-DD-AUTH-TOKEN: f3b68e6f2fd35870f3fd188b737028a78
{
"service_status": {
"details": "success",
"code": 0,
"link": [
{
"rel": "related",
"href": "/rest/v1.0/system"
},
{
"rel": "related",
"href": "/rest/v1.0/dd-systems"
}
]
}
}
The authentication token is used in subsequent calls.
Get basic system information
Now that you have the authentication token, you can access all APIs that the authenticated user has the privilege to use. The following example uses the system API to fetch basic information about the DDMC system. Set the authentication token in the header:
curl --request GET \
--header 'Accept: application/json' \
--header 'X-DD-AUTH-TOKEN:<your-auth-token>
--url https://<DD-SYSTEM-IP/FQDN>:3009/rest/v1.0/system
Sample response:
Response status code: OK(200)
{
"name": "ddmc-7.3-1.brs.lab.emc.com",
"version": "Data Domain OS 7.3.0.5-660120",
"serialno": "AUMCZJFMGMSMYR",
"model": "DD Management Center",
"uptime": "18:39:58 up 10 days, 3:49",
"uptime_secs": 877765,
"uuid": "11e3b3f23ccb590b:a0ae3cd21ebdb52d",
"link": [
{
"rel": "self",
"href": "/rest/v1.0/system"
},
{
"rel": "parent",
"href": "/rest/v1.0"
},
{
"rel": "vi",
"href": "/rest/v1.0/system/vi"
},
{
"rel": "config",
"href": "/rest/v1.0/system/config"
}
]
}
The response returns the detailed information of the DD system.
Log out
To log out of the current session, call the Auth API with the DELETE operation:
curl --request DELETE \
--header 'X-DD-AUTH-TOKEN:<your-auth-token>' \
--url 'https://<DDMC-SYSTEM-IP/FQDN>:3009/rest/v1.0/auth'