API
Stacklets
Restore stacklet

Restore a Stacklet

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

    Send a POST request to restore a stacklet.

Request

Attributes

  • Name
    action
    Type
    string
    Description

    An action attribute with a value of restore to restore the Stacklet.

  • Name
    image_id
    Type
    integer
    Description

    Unique identifier of the snapshot or the backup image which the user want to restore.

Example

curl -X POST "https://api.simplystack.com/v1/stacklets" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
  -d '{"action": "restore", "image_id": "123"}'
 

Response

JSON object with a key named stacklet which is an array of all the attributes associated with the stacklet, in addition to the following new attributes:

Attributes

See stacklet model.

Example

json
{
  "stacklet": {
    "application": null,
    "backup_ids": [],
    "backups_enabled": false,
    "created_at": "2020-09-21T13:11:08.481602Z",
    "disk": 26843545600,
    "distribution": {
      "image": {
        "available": true,
        "default": true,
        "extra_price": "0.0000",
        "min_disk": null,
        "min_vcpu": null,
        "min_memory": null,
        "slug": "ubuntu-20-04-1-x64",
        "version": "20.04.1 x64"
      },
      "name": "Ubuntu"
    },
    "firewall_uuid": null,
    "id": 24,
    "locked": false,
    "memory": 1073741824,
    "name": "stacklet1",
    "networks": {
      "v4": [
        {
          "address": "192.168.50.6",
          "gateway": "192.168.50.1",
          "netmask": "255.255.192.0",
          "type": "public"
        }
      ],
      "v6": [
        {
          "address": "2a07:440:2000:6::21",
          "gateway": "2a07:440:2000:6::1",
          "netmask": 64,
          "range_end": "2a07:440:2000:6::2f",
          "range_start": "2a07:440:2000:6::20",
          "type": "public"
        }
      ]
    },
    "recovery_mode": false,
    "region": {
      "available": true,
      "features": ["floating_ips"],
      "name": "Frankfurt",
      "slug": "fra"
    },
    "size": {
      "available": true,
      "bandwidth": 1099511627776,
      "disk": 26843545600,
      "memory": 1073741824,
      "price_hourly": 0.0069,
      "price_monthly": 5.0,
      "slug": "b-1vcpu-1gb",
      "vcpu": 1
    },
    "snapshot_ids": [],
    "status": "inactive",
    "tags": ["server"],
    "task": {
      "id": 8,
      "name": "restore",
      "description": {
        "completed": "Stacklet restored.",
        "progress": "Stacklet is restoring."
      }
    },
    "vcpu": 1,
    "volume_uuid": null,
    "vpc_uuid": null
  }
}