NavigationContentFooter
Suggest an edit
Was this page helpful?

Increasing the size of Block Storage volumes via the Scaleway API

Reviewed on 04 March 2025Published on 04 March 2025

The Block storage API allows you to interact with Block Storage volumes programmatically through API calls. Refer to the Developers reference website for more information on how to use the Block Storage API.

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
  • A Block Storage volume
  1. Run the command below to list your Block Storage volumes. Do not forget to replace the {zone} placeholder with the desired Availability Zone (fr-par-1, nl-ams-2, etc.):

    curl -X GET \
    -H "X-Auth-Token: $SCW_SECRET_KEY" \
    "https://api.scaleway.com/block/v1alpha1/zones/{zone}/volumes"

    An output similar to the following displays:

    {"volume": {"creation_date": "2020-06-02T08:04:50.094118+00:00", "server": null, "id": "<VOLUME_ID>", "size": 25000000000, "name": "myAwesomeVolume", "zone": "<REGION>", "export_uri": null, "volume_type": "b_ssd", "modification_date": "2020-06-02T08:04:50.094118+00:00", "state": "available", "organization": "<ORGANIZATION_ID>"}}
  2. To modify the volume size, run the request below. Do not forget to replace the placeholders with the appropriate value:

    curl -X PATCH \
    -H "X-Auth-Token: $SCW_SECRET_KEY" \
    -H "Content-Type: application/json" \
    -d '{"size" : "{size_in_bytes}"}' \
    "https://api.scaleway.com/block/v1alpha1/zones/{zone}/volumes/{volume_id}"
    Note

    You can only increase the size of a Block Storage volume. Reducing its size is not permitted due to technical constraints.

    An output similar to the following displays:

    {"volume": {"creation_date": "2020-06-02T08:04:50.094118+00:00", "server": null, "id": "VOLUME_ID", "size": 26000000000, "name": "new_name", "zone": "REGION", "export_uri": null, "volume_type": "b_ssd", "modification_date": "2020-06-02T08:08:27.385208+00:00", "state": "resizing", "organization": "ORGANIZATION_ID"}}

The size of your volume has been updated.

Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2025 – Scaleway