This section describes how to create an AS group by calling a series of API APIs.
- The token obtained from IAM is valid for only 24 hours. If you want to use one token for authentication, you can cache it to avoid frequently calling.
To use token authentication, you need to obtain a token and add X-Auth-Token to the request header of API calls.
- API for obtaining tokens from IAM
- CSBS API for creating backups
- Obtain the token by following instructions in Obtaining Request Authentication Information.
- Send POST https://VBS endpoint/v2/project ID/cloudbackups.
- Add the X-Auth-Token request header.
- Specify the following parameters in the request body:
If the request is responded, a job ID is returned.
If the request fails, an error code and error information are returned. For details, see Error Codes.
- Query job details using the job ID by referring to Querying the Job Status.
If the returned job status is SUCCESS, the VBS backup is successfully created.
For details about error codes, see Status Codes.
- You can obtain the backup ID (backup_id) from the job body and then use the IP to query or delete the backup, as well use the backup to restore data.