NavigationContentFooter
Suggest an edit
Was this page helpful?

Creating a Block Storage volume via the Instance API

Reviewed on 02 January 2025Published on 10 January 2020

Before you startLink to this anchor

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • A valid API key
  1. Create a block volume from the API by launching the following command:
    curl -q \
    -H "X-Auth-Token: $SECRET_KEY" \
    -H 'Content-Type: application/json' \
    -X POST \
    -d '{"name": "block-volume-101", "organization": "'$SCW_ORGANIZATION'", "size": 10000000000, "volume_type": "b_ssd"}' \
    https://api.scaleway.com/instance/v1/zones/fr-par-1/volumes
  2. To retrieve the current status of the block volume, query the volume endpoint.
    curl -q \
    -H "X-Auth-Token: $SECRET_KEY" \
    -H 'Content-Type: application/json' \
    https://api.scaleway.com/instance/v1/zones/fr-par-1/volumes/b3a42fb1-e85c-46e9-b0a6-9adb62278295
    {
    "volume": {
    "size": 10000000000,
    "state": "available",
    "name": "block-volume101",
    "modification_date": "2019-09-03T09:57:53.742130+00:00",
    ...
    "id": "b3a42fb1-e85c-46e9-b0a6-9adb62278295",
    "volume_type": "b_ssd",
    "server": null
    }
    }
Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2025 – Scaleway