API
Snapshots
Rename snapshot

Rename a Snapshot Image

  • Name
    post
    Type
    /v1/snapshots/:id
    Description

    Send a POST request to rename a snapshot.

Request

Set the "action" attribute to rename and set name attribute to the new slug name of the snapshot image.

Required Attributes

  • Name
    action
    Type
    string
    Description

    Action performed on a snapshot image (transfer, rename) in this case rename.

  • Name
    name
    Type
    string
    Description

    New name for the snapshot image.

Example

curl -X GET "https://api.simplystack.com/v1/snapshots" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
  -d '{"action": "rename", "name": "snap1"}'
 

Response

JSON object with a key named snapshot which is an array of the following attributes associated with the snapshot image:

Attributes

See snapshot model.

Example

json
{
  "snapshot": {
    "created_at": "2021-02-07T12:38:51.357354Z",
    "disk_size": 26843545600,
    "id": 11,
    "name": "test-1602074180",
    "regions": [
        'fra'
    ],
    "size": 1270026240,
    "size_gigabytes": 1.2,
    "stacklet": {...},
    "task": {
      "id": 5,
      "name": "rename",
      "description": {
          "progress": "Snapshot is renaming.",
          "completed": "Snapshot was renamed."
      }
    }
  }
}