Web Hosting API

Introduction

Scaleway provides several Web Hosting plans for individuals, professionals, and everyone in between. Our Web Hosting plans include:

  • A domain name
  • A configurable webhosting service
  • The management of your emails, including anti-spam, antivirus and filter systems
  • Unlimited sub-domains
  • An FTP account to upload your website
  • At least one database

Concepts

Refer to our dedicated concepts page to find definitions of all Web Hosting-related terminology.

Quickstart

  1. Configure your environment variables.

    Note:

    This is an optional step that seeks to simplify your usage of the Web Hosting API.

    export SCW_SECRET_KEY="<API secret key>"
    export SCW_PROJECT_ID="<Scaleway Project ID>"
  2. Choose a Web Hosting offer: run the following command to list all Web Hosting offers. The | jq appendage at the end of the command makes the output easier to read.

    curl -X GET \
    -H "X-Auth-Token: $SCW_SECRET_KEY" \
    -H "Content-Type: application/json" \
    "https://api.scaleway.com/webhosting/v1alpha1/regions/fr-par/offers?without_options=true" | jq
    Note:

    In the above example, we choose to get offers only. Adjust the query parameter if you would also like to get information about the different options you can add to offers.

  3. Order a Web Hosting plan: run the following command to create a Web Hosting plan. You can customize the details in the payload to your needs, using the table below to help.

    curl -X POST \
    -H "X-Auth-Token: $SCW_SECRET_KEY" \
    -H "Content-Type: application/json" \
    "https://api.scaleway.com/webhosting/v1alpha1/regions/fr-par/hostings" \
    -d '{
    "domain": "mydomain.net",
    "offer_id": "f5c2ae8f-7625-4bca-b711-b44bb3d08694",
    "project_id": "'"$SCW_PROJECT_ID"'",
    "tags": ["my-tag"]
    }'
    ParameterDescriptionValid values OR Example
    domainThe domain name you would like to link to your Web Hosting account. You must already own this domain name and have completed the DNS validation process beforehand.mydomain.net
    offer_idThe offer ID of the desired offer. Use one of the offer IDs returned in step 2f5c2ae8f-7625-4bca-b711-b44bb3d08694
    project_idThe ID of the Scaleway Project to create the Web Hosting plan in.277ed74e-ea73-11ed-a05b-0242ac120003
    tagsAny tags you would like to associate with this Web Hosting planmy-tag
    Tip:

    Once you've ordered your Web Hosting plan, check out our dedicated documentation to get started with your configuration.

  4. Delete your Web Hosting plan: run the following command to delete your Web Hosting plan. Ensure that you replace {hosting-id} in the URL with the ID of the Web Hosting plan you want to delete.

    curl -X DELETE \
    -H "Content-Type: application/json" \
    -H "X-Auth-Token: $SCW_SECRET_KEY" \
    "https://api.scaleway.com/rest-of-endpoint/{hosting-id}"
Requirements:

Technical information

All Scaleway Web Hosting plans use the cPanel website management control panel tool. It provides a graphical interface and fast access icons which allow the configuration and monitoring of your hosting solutions. You can access cPanel via the Scaleway console.

Regions

The Scaleway Web Hosting API is a regional API, meaning that each call must specify in its path parameters the region for the resources concerned by the call.

Scaleway Web Hosting is available only in the fr-par region.

Going further

For more help using Scaleway Web Hosting, check out the following resources:

Web Hosting

With a Scaleway Web Hosting plan, you can manage your domain, configure your web hosting services, manage your emails and more. Create, list, update and delete your Web Hosting plans with these calls

GET
/webhosting/v1alpha1/regions/{region}/domains/{domain}/dns-records
GET
/webhosting/v1alpha1/regions/{region}/hostings
POST
/webhosting/v1alpha1/regions/{region}/hostings
GET
/webhosting/v1alpha1/regions/{region}/hostings/{hosting_id}
PATCH
/webhosting/v1alpha1/regions/{region}/hostings/{hosting_id}
DELETE
/webhosting/v1alpha1/regions/{region}/hostings/{hosting_id}
POST
/webhosting/v1alpha1/regions/{region}/hostings/{hosting_id}/restore

Web Hosting Offers

Web Hosting offers represent the different types of Web Hosting plan available to order at Scaleway.

GET
/webhosting/v1alpha1/regions/{region}/offers

Control Panels

Control panels represent the kind of administration panel to manage your Web Hosting plan, cPanel or plesk

GET
/webhosting/v1alpha1/regions/{region}/control-panels