Create Volume
- Name
post
- Type
- /v1/volumes
- Description
Send a
POST
request to creata a volume.
Request
Required Attributes
- Name
name
- Type
- string
- Description
The volume name given by the user.
- Name
stacklet_id
- Type
- integer
- Description
The stacklet id where the volume will be attached.
- Name
size_gigabytes
- Type
- integer
- Description
The Block Storage Volume size in gigabytes.
Example
curl -X POST "https://api.simplystack.com/v1/volumes" \
-H "Content-Type: application/json" \
-H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
-d '{"name": "volume01", "size_gigabytes": 10, "stacklet_id": 1}'
Response
JSON object with key named volume
with the following identifiers associated with the volume:
Attributes
Example
json
}
"volume": {
"id": "6c848d7f-0389-4fdf-95bf-7d4d58d9cc04",
"name": "volume01",
"created_at": "2020-01-07T18:37:45.190194Z",
"task": {
"id": 1,
"name": "create",
"description": {
"completed": "Volume was created.",
"progress": "Volume is creating."
}
},
"region": {
"available": true,
"features": [
"floating_ips"
],
"name": "Frankfurt",
"slug": "fra"
},
"size": 10737418240,
"size_gigabytes": 10.0,
"stacklet": {...}
}
}