Creating a Snapshot
Function
This API is used to create a snapshot for a specified cluster.
Calling Method
For details, see Calling APIs.
URI
POST /v1.0/{project_id}/snapshots
| 
         Parameter  | 
       
         Mandatory  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|---|
| 
         project_id  | 
       
         Yes  | 
       
         String  | 
       
         Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A  | 
      
Request Parameters
| 
         Parameter  | 
       
         Mandatory  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|---|
| 
         snapshot  | 
       
         Yes  | 
       
         Snapshot object  | 
       
         Definition Snapshot object. Constraints N/A Range N/A Default Value N/A  | 
      
| 
         Parameter  | 
       
         Mandatory  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|---|
| 
         name  | 
       
         Yes  | 
       
         String  | 
       
         Definition Snapshot name. It must be unique and start with a letter. It consists of 4 to 64 characters. Only letters (case-insensitive), digits, hyphens (-), and underscores (_) are allowed. Range N/A  | 
      
| 
         cluster_id  | 
       
         Yes  | 
       
         String  | 
       
         Definition ID of the cluster for which you want to create a snapshot. Range N/A  | 
      
| 
         description  | 
       
         No  | 
       
         String  | 
       
         Definition Snapshot description. If no value is specified, the description is empty. The value can contain a maximum of 256 characters. The following special characters are not allowed: !<>'=&" Range N/A  | 
      
Response Parameters
Status code: 200
| 
         Parameter  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|
| 
         snapshot  | 
       
         SnapshotResp object  | 
       
         Definition Snapshot object. Range N/A  | 
      
Example Requests
Create a manual snapshot named snapshot-3 for the cluster whose ID is 44b277eb-39be-4921-be31-3d61b43651d7.
POST https://{Endpoint}/v1.0/89cd04f168b84af6be287f71730fdb4b/snapshots
{
  "snapshot" : {
    "name" : "snapshot-3",
    "cluster_id" : "44b277eb-39be-4921-be31-3d61b43651d7",
    "description" : "Snapshot-3 description"
  }
}
  Example Responses
Status code: 200
The snapshot is created.
{
  "snapshot" : {
    "id" : "2a4d0f86-67cd-408a-8b66-017454fb7793"
  }
}
  Status Codes
| 
         Status Code  | 
       
         Description  | 
      
|---|---|
| 
         200  | 
       
         The snapshot is created.  | 
      
| 
         400  | 
       
         Request error.  | 
      
| 
         401  | 
       
         Authentication failed.  | 
      
| 
         403  | 
       
         You do not have required permissions.  | 
      
| 
         404  | 
       
         No resources found.  | 
      
| 
         500  | 
       
         Internal server error.  | 
      
| 
         503  | 
       
         Service unavailable.  | 
      
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.