Web Hosting API

https://api.gandi.net/v5/simplehosting/

Web Hosting API

Introduction

This section of our documentation will assist you in the management of Web Hosting instances at Gandi.net through our REST API.

Documentation on our XML-RPC API can be found at https://doc.rpc.gandi.net

General information on Gandi's Web Hosting services can be found in our public documentation at:
https://docs.gandi.net/en/web_hosting

Web Hosting applications list

https://api.gandi.net/v5/simplehosting/applications

get List Web Hosting applications

This route lists the applications that can be installed on a Web Hosting instance.

Request

Query String
  • Optional
    • database ⁠string
      Filters the list with the database they can use, with optional patterns.
      Example: mysql
      Example: pg*
    • language ⁠string
      Filters the list by the language they use, with optional patterns.
      Example: php
      Example: py*
    • name ⁠string
      Filters the list by application name, with optional patterns.
      Example: nextcloud
      Example: mato*
      Example: *press
    • page ⁠integer

      Default: 1

      Minimum: 1

      Which result page to retrieve. If the number is greater than the last page, an empty list is returned.
    • per_page ⁠integer

      Minimum: 1

      How many items to display per page.
    • sharing_id ⁠string
      Sharing ID. Organization ID used as a filter or as a billing identifier. See the reference.
    • sort_by ⁠string

      Default: "-created_at"

      Indicate the field used to sort the results. The field's name may start with - to reverse the order.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Headers
    • Filtered-Count ⁠integer
      Number of items returned by the API call.
    • Total-Count ⁠integer
      Total number of items.
    Optional
    • Link ⁠string
      Links to next and last page.
Body
  • application/json
    ⁠array

    Of items of type:

    • object

      With the following properties:

      • name ⁠string
      • name_label ⁠string
      • requirements ⁠array

        Of items of type:

        • object

          With the following properties:

          • database ⁠object
            Database supported by the application

            With the following properties:

            • name ⁠string
            • status ⁠string
            • version ⁠string
          • instance_minimum_size ⁠string
            Minimum required PaaS size for this application
          • language ⁠object
            Language used by the application

            With the following properties:

            • name ⁠string
            • single_application ⁠boolean
              true if the application must be the only vhost of the instance
            • status ⁠string
            • version ⁠string

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Web Hosting application information

https://api.gandi.net/v5/simplehosting/applications/{application_name}

get Application details

This route returns detailed information for a given application.

Request

URI Parameters
    • application_name ⁠string
      Name of an application.

Responses

200

Body
  • application/json
    ⁠object

    With the following properties:

    • name ⁠string
    • name_label ⁠string
    • requirements ⁠array

      Of items of type:

      • object

        With the following properties:

        • database ⁠object
          Database supported by the application

          With the following properties:

          • name ⁠string
          • status ⁠string
          • version ⁠string
        • instance_minimum_size ⁠string
          Minimum required PaaS size for this application
        • language ⁠object
          Language used by the application

          With the following properties:

          • name ⁠string
          • single_application ⁠boolean
            true if the application must be the only vhost of the instance
          • status ⁠string
          • version ⁠string

Web Hosting instances list and create

https://api.gandi.net/v5/simplehosting/instances

get List Web Hosting instances

This route lists the instances the authenticated user has permission to access.

Request

Query String
  • Optional
    • fqdn ⁠string
      Filters the list by vhost domain name, with optional patterns.
      The FQDN must be encoded in ASCII form (Punycode).
      Example: example.net
      Example: example.*
      Example: *example.com
    • name ⁠string
      Filters the list by instance name, with optional patterns.
      Example: example
      Example: examp*
      Example: *mple
    • page ⁠integer

      Default: 1

      Minimum: 1

      Which result page to retrieve. If the number is greater than the last page, an empty list is returned.
    • per_page ⁠integer

      Minimum: 1

      How many items to display per page.
    • sharing_id ⁠string
      Sharing ID. Organization ID used as a filter or as a billing identifier. See the reference.
    • size ⁠string

      One of: "s", "s+", "m", "l", "xl", "xxl", "starter", "advanced", "pro", "business"

      Filters the list by instance size.
    • sort_by ⁠string

      Default: "-created_at"

      Indicate the field used to sort the results. The field's name may start with - to reverse the order.
    • status ⁠string

      One of: "waiting_bill", "being_created", "active", "paused", "locked", "being_deleted"

      Filters the list by instance status.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Headers
    • Filtered-Count ⁠integer
      Number of items returned by the API call.
    • Total-Count ⁠integer
      Total number of items.
    Optional
    • Link ⁠string
      Links to next and last page.
Body
  • application/json
    ⁠array

    Of items of type:

    • object

      With the following properties:

      • available_upgrade ⁠boolean
      • created_at ⁠datetime
      • database ⁠object

        With the following properties:

        • name ⁠string
        • status ⁠string
        • version ⁠string
      • datacenter ⁠object

        With the following properties:

        • code ⁠string

          One of: "FR-SD3", "FR-SD5", "FR-SD6", "LU-BI1"

        • name ⁠string
        • region ⁠string

          One of: "FR", "LU"

      • expire_at ⁠datetime
      • id ⁠string
        UUID
      • language ⁠object

        With the following properties:

        • name ⁠string
        • single_application ⁠boolean
          true if the application must be the only vhost of the instance
        • status ⁠string
        • version ⁠string
      • name ⁠string
      • sharing_space ⁠object

        With the following properties:

        • id ⁠string
          UUID
        Optional
        • name ⁠string
      • size ⁠string

        One of: "s", "s+", "m", "l", "xl", "xxl", "starter", "advanced", "pro", "business"

      • snapshot_enabled ⁠boolean
      • status ⁠string

        One of: "waiting_bill", "being_created", "active", "paused", "locked", "being_deleted"

      • storage ⁠object

        With the following properties:

        • additional ⁠object

          With the following properties:

          • unit ⁠string

            One of: "MB", "GB"

          • value ⁠integer
        • base ⁠object

          With the following properties:

          • unit ⁠string

            One of: "MB", "GB"

          • value ⁠integer
        • total ⁠object

          With the following properties:

          • unit ⁠string

            One of: "MB", "GB"

          • value ⁠integer
      Optional
      • autorenew ⁠object

        With the following properties:

        • duration ⁠integer
        • duration_type ⁠string

          One of: "m"

      • domain ⁠string
      • password_updated_at ⁠datetime
        Last password update date. Only present if a password is set.
      • subscription_cancelled ⁠boolean
        Whether the Web Hosting subscription is cancelled.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

post Create Web Hosting instances

This route creates a new Web Hosting instance

Warning! This is not a free operation. Please ensure your prepaid account has enough credit, or that you have a registered credit card.

Request

Query String
  • Optional
    • sharing_id ⁠string

      Organization ID used as a billing identifier.

      (Deprecated: cannot be used with Personal Access Tokens. See Authentication).

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
    Optional
    • Dry-Run ⁠integer
      If this header's value is 1 the request's parameters will only be checked; the operation will not actually be performed.
Body
  • application/json
    ⁠object

    With the following properties:

    Required
    • location ⁠string

      One of: "FR", "LU"

      Indicates where the instance will be created.
    • size ⁠string

      One of: "starter", "advanced", "pro", "business"

      The size of the instance
    • type ⁠object
      The database and language to use for the Web Hosting instance.

      With the following properties:

      Required
      • database ⁠object

        With the following properties:

        Required
        • name ⁠string

          One of: "mysql", "pgsql"

          The database management system to use.
        Optional
        • version ⁠string
          The database version to use, defaulting on the recommended version if the field is missing.
      • language ⁠object

        With the following properties:

        Required
        • name ⁠string

          One of: "php", "python", "nodejs", "ruby"

          The language interpreter to use
        Optional
        • version ⁠string
          The language version to use, if none given will chose the recommended version.
    Optional
    • authentication ⁠object

      If this field is absent, instance storage cannot be accessed through sftp and the advanced control panel will be unavailable until a password is set.

      Username and hostname to connect to will be available in instance details once created.

      With the following properties:

      Required
      • password ⁠string
        The password for sftp, git and advanced control panel access. Hashed passwords are not accepted.
      Optional
      • keys ⁠array
        IDs of SSH public keys registered through our SSH keys API.

        Of items of type:

        • string
          UUID
      • ssh_keys ⁠array[ string ]
        SSH public keys for sftp and git access in OpenSSH format.
    • autorenew ⁠boolean
      If true, the instance will automatically be renewed upon expiration, ensure you have set up a payment method linked to your prepaid or that your prepaid has enough money.
    • domain ⁠object
      To register a free domain name that will be linked to Web Hosting instance.

      With the following properties:

      Required
      • fqdn ⁠string
      • owner ⁠object

        With the following properties:

        Required
        • country ⁠string
          A country code. See the country code list for possible values.
        • email ⁠string
        • family ⁠string
          Contact's family name (usualy the lastname)
        • given ⁠string
          Contact's given name (usualy the firstname)
        • streetaddr ⁠string
        • type ⁠string

          One of: "individual", "company", "association", "publicbody"

        Optional
        • brand_number ⁠string
        • city ⁠string
        • data_obfuscated ⁠boolean

          Default: true

          Learn more about WHOIS privacy at Gandi here.
        • extra_parameters ⁠object
          Extra parameters needed for some extensions. See this list for possible values.
        • fax ⁠string
        • jo_announce_number ⁠string
        • jo_announce_page ⁠string
        • jo_declaration_date ⁠string
        • jo_publication_date ⁠string
        • lang ⁠string

          One of: "en", "es", "fr", "ja", "zh-hans", "zh-hant"

        • mail_obfuscated ⁠boolean
        • mobile ⁠string
        • orgname ⁠string
          The legal name of the company, association, or public body if the contact type is not 0.
        • phone ⁠string
        • siren ⁠string
        • state ⁠string
          Learn more about state codes here
        • validation ⁠string

          One of: "pending", "done", "failed", "deleted", "none"

        • zip ⁠string
      Optional
      • admin ⁠object

        With the following properties:

        Required
        • country ⁠string
          A country code. See the country code list for possible values.
        • email ⁠string
        • family ⁠string
          Contact's family name (usualy the lastname)
        • given ⁠string
          Contact's given name (usualy the firstname)
        • streetaddr ⁠string
        • type ⁠string

          One of: "individual", "company", "association", "publicbody"

        Optional
        • brand_number ⁠string
        • city ⁠string
        • data_obfuscated ⁠boolean

          Default: true

          Learn more about WHOIS privacy at Gandi here.
        • extra_parameters ⁠object
          Extra parameters needed for some extensions. See this list for possible values.
        • fax ⁠string
        • jo_announce_number ⁠string
        • jo_announce_page ⁠string
        • jo_declaration_date ⁠string
        • jo_publication_date ⁠string
        • lang ⁠string

          One of: "en", "es", "fr", "ja", "zh-hans", "zh-hant"

        • mail_obfuscated ⁠boolean
        • mobile ⁠string
        • orgname ⁠string
          The legal name of the company, association, or public body if the contact type is not 0.
        • phone ⁠string
        • siren ⁠string
        • state ⁠string
          Learn more about state codes here
        • validation ⁠string

          One of: "pending", "done", "failed", "deleted", "none"

        • zip ⁠string
      • bill ⁠object

        With the following properties:

        Required
        • country ⁠string
          A country code. See the country code list for possible values.
        • email ⁠string
        • family ⁠string
          Contact's family name (usualy the lastname)
        • given ⁠string
          Contact's given name (usualy the firstname)
        • streetaddr ⁠string
        • type ⁠string

          One of: "individual", "company", "association", "publicbody"

        Optional
        • brand_number ⁠string
        • city ⁠string
        • data_obfuscated ⁠boolean

          Default: true

          Learn more about WHOIS privacy at Gandi here.
        • extra_parameters ⁠object
          Extra parameters needed for some extensions. See this list for possible values.
        • fax ⁠string
        • jo_announce_number ⁠string
        • jo_announce_page ⁠string
        • jo_declaration_date ⁠string
        • jo_publication_date ⁠string
        • lang ⁠string

          One of: "en", "es", "fr", "ja", "zh-hans", "zh-hant"

        • mail_obfuscated ⁠boolean
        • mobile ⁠string
        • orgname ⁠string
          The legal name of the company, association, or public body if the contact type is not 0.
        • phone ⁠string
        • siren ⁠string
        • state ⁠string
          Learn more about state codes here
        • validation ⁠string

          One of: "pending", "done", "failed", "deleted", "none"

        • zip ⁠string
      • extra_parameters ⁠object
        Extra parameters needed for some extensions. See this list for possible values.
      • lang ⁠string
        ISO-639-2 language code of the domain, required for some IDN domains.
      • tech ⁠object

        With the following properties:

        Required
        • country ⁠string
          A country code. See the country code list for possible values.
        • email ⁠string
        • family ⁠string
          Contact's family name (usualy the lastname)
        • given ⁠string
          Contact's given name (usualy the firstname)
        • streetaddr ⁠string
        • type ⁠string

          One of: "individual", "company", "association", "publicbody"

        Optional
        • brand_number ⁠string
        • city ⁠string
        • data_obfuscated ⁠boolean

          Default: true

          Learn more about WHOIS privacy at Gandi here.
        • extra_parameters ⁠object
          Extra parameters needed for some extensions. See this list for possible values.
        • fax ⁠string
        • jo_announce_number ⁠string
        • jo_announce_page ⁠string
        • jo_declaration_date ⁠string
        • jo_publication_date ⁠string
        • lang ⁠string

          One of: "en", "es", "fr", "ja", "zh-hans", "zh-hant"

        • mail_obfuscated ⁠boolean
        • mobile ⁠string
        • orgname ⁠string
          The legal name of the company, association, or public body if the contact type is not 0.
        • phone ⁠string
        • siren ⁠string
        • state ⁠string
          Learn more about state codes here
        • validation ⁠string

          One of: "pending", "done", "failed", "deleted", "none"

        • zip ⁠string
    • duration ⁠integer

      Default: 1

      Minimum: 1

      The duration your instance will be created for in duration_unit. If none given the instance will be created for a month.
    • duration_unit ⁠string

      One of: "m"

      Default: "m"

      The unit to use for duration field, currently only months are supported (m)
    • name ⁠string
      The name of the instance, if none is given a name will be generated.
    • snapshot_enabled ⁠boolean

      Default: false

      If true, automatic snapshots will be enabled for this instance.

      Please note that a snapshot doesn't replace a proper backup.

    • storage_additional_size ⁠integer

      Default: 0

      Minimum: 0

      Maximum: 1004

      Additional storage amount for the instance in GB
    • vhosts ⁠array
      Creates the described vhosts on the instance on creation

      Of items of type:

      • object

        With the following properties:

        Required
        • fqdn ⁠string
          FQDN of the vhost
        Optional
        • application ⁠object
          An application to install on the vhost upon creation. The application list, parameters and language/database compatibility is available here

          With the following properties:

          Required
          • name ⁠string
          Optional
          • parameters ⁠object
        • https_strategy ⁠string

          One of: "HTTP_only", "allow_HTTP_and_HTTPS", "redirect_HTTP_to_HTTPS"

          Default: "allow_HTTP_and_HTTPS"

          The strategy to use for secure connection to the vhost.
        • linked_dns_zone ⁠object

          With the following properties:

          Optional
          • allow_alteration ⁠boolean

            Default: false

            If true we set the DNS records for the vhost, can only be set if related domain is managed by LiveDNS and you have the rights to manage the domain records.
          • allow_alteration_override ⁠boolean

            Default: false

            If true we will override an existing record for this vhost if one exists. Has no effect if zone_alter is false.
        • with_free_ssl ⁠boolean

          Default: false

          If true, we will create a free certificate after the instance gets created.

Responses

200

Dry-Run response. You will get this response when you send your request. with a Dry-Run: 1 header.
Headers
  • Optional
    • Warning ⁠string
      Warning message
Body
  • application/json
    ⁠object

    With the following properties:

    • status ⁠string

      One of: "success", "error"

      Response status.
    Optional
    • errors ⁠array
      A list of all the errors encountered during validation.

      Of items of type:

      • object

        With the following properties:

        • description ⁠string
          Error message.
        • location ⁠string

          One of: "header", "path", "querystring", "body"

          The field's location in the HTTP response.
        • name ⁠string
          The xpath of the field.

202

Headers
    • Content-Location ⁠string
      Link to the created instance
Body
  • application/json
    ⁠object

    With the following properties:

    • message ⁠string
      Confirmation message.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Web Hosting instance information

https://api.gandi.net/v5/simplehosting/instances/{instance_id}

get Instance details

This route returns detailed information for a given instance.

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Body
  • application/json
    ⁠object

    With the following properties:

    • access_information ⁠object

      With the following properties:

      • admin_url ⁠string
      • database ⁠object

        With the following properties:

        • admins ⁠array

          Of items of type:

          • object

            With the following properties:

            • type ⁠string

              One of: "phpMyAdmin", "phpPgAdmin", "Adminer"

            • url ⁠string
            Optional
            • username ⁠string
        • host ⁠string
        Optional
        • port ⁠integer
          In case the database listens to an inet-type socket this field will contain the port number used by the database
        • socket ⁠string
          In the event this database listens to a UNIX-type socket this field will contain the path of the socket
      • sftp ⁠object

        With the following properties:

        • server ⁠string
        • url ⁠string
      • user ⁠string
    • available_upgrade ⁠boolean
    • console ⁠object
      The emergency console is a serial-like console you can access via SSH.

      With the following properties:

      • enabled ⁠boolean
      • url ⁠string
    • cpu ⁠integer
    • created_at ⁠datetime
    • database ⁠object

      With the following properties:

      • name ⁠string
      • status ⁠string
      • version ⁠string
    • datacenter ⁠object

      With the following properties:

      • code ⁠string

        One of: "FR-SD3", "FR-SD5", "FR-SD6", "LU-BI1"

      • name ⁠string
      • region ⁠string

        One of: "FR", "LU"

    • expire_at ⁠datetime
    • id ⁠string
      UUID
    • language ⁠object

      With the following properties:

      • name ⁠string
      • single_application ⁠boolean
        true if the application must be the only vhost of the instance
      • status ⁠string
      • version ⁠string
    • name ⁠string
    • ram ⁠object

      With the following properties:

      • unit ⁠string

        One of: "MB", "GB"

      • value ⁠integer
    • sharing_space ⁠object

      With the following properties:

      • id ⁠string
        UUID
      Optional
      • name ⁠string
    • size ⁠string

      One of: "s", "s+", "m", "l", "xl", "xxl", "starter", "advanced", "pro", "business"

    • snapshot_enabled ⁠boolean
    • status ⁠string

      One of: "waiting_bill", "being_created", "active", "paused", "locked", "being_deleted"

    • storage ⁠object

      With the following properties:

      • additional ⁠object

        With the following properties:

        • unit ⁠string

          One of: "MB", "GB"

        • value ⁠integer
      • base ⁠object

        With the following properties:

        • unit ⁠string

          One of: "MB", "GB"

        • value ⁠integer
      • total ⁠object

        With the following properties:

        • unit ⁠string

          One of: "MB", "GB"

        • value ⁠integer
    • vhosts ⁠array

      Of items of type:

      • object

        With the following properties:

        • fqdn ⁠string
          FQDN linked to the vhost in ASCII (Punycode) format.
        • href ⁠string
          Link to vhost details
    Optional
    • autorenew ⁠object

      With the following properties:

      • duration ⁠integer
      • duration_type ⁠string

        One of: "m"

    • booster ⁠object

      With the following properties:

      Optional
      • current ⁠object

        With the following properties:

        • cpu_override ⁠integer
        • created_at ⁠datetime
        • expires_at ⁠datetime
        • ram_override ⁠object

          With the following properties:

          • unit ⁠string

            One of: "MB", "GB"

          • value ⁠integer
        • size_override ⁠string

          One of: "s", "s+", "m", "l", "xl", "xxl", "starter", "advanced", "pro", "business"

        • status ⁠string

          One of: "being_created", "active", "being_deleted"

      • next ⁠object

        With the following properties:

        • available ⁠boolean
        • cooldown_days ⁠integer
        • default_cpu_override ⁠integer
        • default_ram_override ⁠object

          With the following properties:

          • unit ⁠string

            One of: "MB", "GB"

          • value ⁠integer
        • duration_days ⁠integer
        Optional
        • available_at ⁠datetime
    • compatible_applications ⁠array

      Of items of type:

      • object

        With the following properties:

        • name ⁠string
        Optional
        • parameters ⁠object
    • domain ⁠string
    • password_updated_at ⁠datetime
      Last password update date. Only present if a password is set.
    • subscription_cancelled ⁠boolean
      Whether the Web Hosting subscription is cancelled.
    • upgrade_to ⁠array

      Of items of type:

      • object

        With the following properties:

        • name ⁠string
        • status ⁠string
        • type ⁠string
          Indicate whether the available upgrade is a database or a language upgrade.
        • version ⁠string

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

patch Web Hosting instance modification

This route allows to modify a given instance

Be mindful that it can induce a payment, typically if the instance size or storage additional size is modified.

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
Body
  • application/json
    ⁠object

    With the following properties:

    Optional
    • booster ⁠boolean
    • booster_options ⁠object

      With the following properties:

      Optional
      • size ⁠string

        One of: "s", "s+", "m", "l", "xl", "xxl", "starter", "advanced", "pro", "business", "boosted"

    • language_id ⁠string
      UUID of the language to upgrade to. This value can be found in the upgrade_to field of the return of a GET of this instance (which lists the available upgrades).
    • name ⁠string
    • password ⁠string
      The password for sftp, git and advanced control panel access. Hashed passwords are not accepted.
    • size ⁠string

      One of: "s+", "m", "l", "xxl"

      Resize the instance (triggering a payment). Only supported for s, s+, m, l, xl, and xxl instances.
    • snapshot_enabled ⁠boolean
      If true, automatic snapshots will be enabled for this instance.
    • storage_additional_size ⁠integer
      Additional storage amount for the instance in GB. Note that only increases are supported.

Responses

202

Headers
    • Content-Location ⁠string
      Link to the modified instance.
Body
  • application/json
    ⁠object

    With the following properties:

    • message ⁠string

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

delete

This route deletes the given instance. This action can lead to a refund on your prepaid account if the instance is refundable.

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

204

Instance is deleted

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Web Hosting instance actions

https://api.gandi.net/v5/simplehosting/instances/{instance_id}/action

post Perform an action on the instance

This route allows restarting, resetting the database password, and activating the instance console.

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
Body
  • application/json
    ⁠object

    With the following properties:

    Required
    • action ⁠string

      One of: "restart", "console", "reset_database_password"

Responses

202

Headers
    • Content-Location ⁠string
      Link to the instance on which the action is taken
Body
  • application/json
    ⁠object

    With the following properties:

    • message ⁠string
      Confirmation message.

204

An internal error has occurred and the action cannot be performed.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Web Hosting instance usage metrics

https://api.gandi.net/v5/simplehosting/instances/{instance_id}/usage

get Usage metrics

This route is used to get usage metrics of an instance

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Body
  • application/json
    ⁠object

    With the following properties:

    • disk_size_bytes ⁠integer
      The total disk space in bytes.
    Optional
    • disk_used_bytes ⁠integer
      The used disk space in bytes.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Web Hosting instance vhost list and create

https://api.gandi.net/v5/simplehosting/instances/{instance_id}/vhosts

get List vhosts

This route is used to list vhosts of an instance.

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
Query String
  • Optional
    • fqdn ⁠string
      Filters the list by vhost domain name, with optional patterns.
      The FQDN must be encoded in ASCII form (Punycode).
      Example: example.net
      Example: example.*
      Example: *example.com
    • page ⁠integer

      Default: 1

      Minimum: 1

      Which result page to retrieve. If the number is greater than the last page, an empty list is returned.
    • per_page ⁠integer

      Minimum: 1

      How many items to display per page.
    • sort_by ⁠string

      Default: "-created_at"

      Indicate the field used to sort the results. The field's name may start with - to reverse the order.
    • status ⁠string

      One of: "being_created", "running", "being_deleted", "locked", "waiting_ownership", "ownership_validated", "validation_failed"

      Filters the list by vhost status.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Headers
    • Filtered-Count ⁠integer
      Number of items returned by the API call.
    • Total-Count ⁠integer
      Total number of items.
    Optional
    • Link ⁠string
      Links to next and last page.
Body
  • application/json
    ⁠array

    Of items of type:

    • object

      With the following properties:

      • created_at ⁠datetime
      • fqdn ⁠string
        FQDN linked to the vhost in ASCII (Punycode) format.
      • is_a_test_vhost ⁠boolean
        True if the vhost is intended for testing purposes only.
      • linked_dns_zone ⁠object
        This field contains information on the DNS zone the vhost is linked to.

        With the following properties:

        • allow_alteration ⁠boolean
          True if you authorized Gandi to modify your DNS zone so that your vhost points to our Web Hosting public endpoints. If set to True and your DNS zone is managed by our liveDNS platform, you will not have to manually change your DNS configuration to validate your vhost ownership. Check last_checked_status to validate.
        • last_checked_status ⁠string

          One of: "altered", "livedns_conflict", "livedns_done", "livedns_error", "unknown"

          DNS zone validity when last checked
        Optional
        • last_checked_at ⁠datetime
          Date of the last check for zone validity
      • status ⁠string

        One of: "being_created", "running", "being_deleted", "locked", "waiting_ownership", "ownership_validated", "validation_failed"

      Optional
      • application ⁠object

        With the following properties:

        • name ⁠string
        Optional
        • parameters ⁠object
      • https_strategy ⁠string

        One of: "HTTP_only", "allow_HTTP_and_HTTPS", "redirect_HTTP_to_HTTPS"

        Describes the strategy used regarding secure connection to your vhost (HTTP/HTTPS). This field is only present if you have a certificate.
      • tls_validated_at ⁠datetime
        The last time Gandi successfully checked the connectivity to your vhost through TLS.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

post Create a new vhost

This route is used to create a vhost on an instance.

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
Body
  • application/json
    ⁠object

    With the following properties:

    Required
    • fqdn ⁠string
      fqdn of the vhost.
    Optional
    • application ⁠object

      With the following properties:

      Required
      • name ⁠string
      Optional
      • parameters ⁠object
    • linked_dns_zone ⁠object

      With the following properties:

      Required
      • allow_alteration ⁠boolean
        True if you authorized Gandi to modify your DNS zone so that your vhost points to our Web Hosting public endpoints. If set to True and your DNS zone is managed by our liveDNS platform, you will not have to manually change your DNS configuration to validate your vhost ownership. Check last_checked_status to validate.
      Optional
      • allow_alteration_override ⁠boolean

        Default: false

        True to override your DNS zone if there already is a record on your vhost fqdn.

Responses

202

Headers
    • Content-Location ⁠string
      Link to the new vhost.
Body
  • application/json
    ⁠object

    With the following properties:

    • fqdn ⁠string
      fqdn of the vhost.
    • https_strategy ⁠string

      One of: "HTTP_only", "allow_HTTP_and_HTTPS", "redirect_HTTP_to_HTTPS"

      Describes the strategy used regarding secure connection to your vhost (HTTP/HTTPS). This field is only present if you have a certificate.
    • linked_dns_zone ⁠object

      With the following properties:

      • allow_alteration ⁠boolean
        True if you authorized Gandi to modify your DNS zone so that your vhost points to our Web Hosting public endpoints. If set to True and your DNS zone is managed by our liveDNS platform, you will not have to manually change your DNS configuration to validate your vhost ownership. Check last_checked_status to validate.
      • last_checked_status ⁠string

        One of: "altered", "livedns_conflict", "livedns_done", "livedns_error", "unknown"

        DNS zone validity when last checked
    • status ⁠string

      One of: "being_created", "running", "being_deleted", "locked", "waiting_ownership", "ownership_validated", "validation_failed"

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

422

The vhost already exist on the instance and the creation cannot be performed.

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Web Hosting vhost information

https://api.gandi.net/v5/simplehosting/instances/{instance_id}/vhosts/{vhost_fqdn}

get Vhost details

This route returns the detailed information about the given vhost.

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
    • vhost_fqdn ⁠string
      fqdn of a vhost.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Body
  • application/json
    ⁠object

    With the following properties:

    • created_at ⁠datetime
    • fqdn ⁠string
      FQDN linked to the vhost in ASCII (Punycode) format.
    • is_a_test_vhost ⁠boolean
      True if the vhost is intended for testing purposes only.
    • linked_dns_zone ⁠object
      This field contains information on the DNS zone the vhost is linked to.

      With the following properties:

      • allow_alteration ⁠boolean
        True if you authorized Gandi to modify your DNS zone so that your vhost points to our Web Hosting public endpoints. If set to True and your DNS zone is managed by our liveDNS platform, you will not have to manually change your DNS configuration to validate your vhost ownership. Check last_checked_status to validate.
      • allow_alteration ⁠boolean
        True if you authorized Gandi to modify your DNS zone so that your vhost points to our Web Hosting public endpoints. If set to True and your DNS zone is managed by our liveDNS platform, you will not have to manually change your DNS configuration to validate your vhost ownership. Check last_checked_status to validate.
      • cname ⁠string
        Canonical name of the web accelerator hosting your vhost. You need this if the vhost is not the apex (top level) of your zone
      • domain ⁠string
        FQDN of the zone to which you need to apply the DNS records
      • ipv4 ⁠string
        IPv4 pointing to the web accelerator hosting your vhost. You only need this if the vhost is at the root of your zone
      • ipv6 ⁠string
        IPv6 pointing to the web accelerator hosting your vhost. You only need this if the vhost is at the root of your zone
      • is_alterable ⁠boolean
        True if the zone can be automatically managed by Web Hosting
      • is_root ⁠boolean
        True if the vhost is on the root of the zone. It means you have to add A and AAAA entries to your zone rather than a CNAME.
      • key ⁠string
        The name associated with the entries to add to your zone, if the vhost is the root of your zone it should be @.
      • last_checked_status ⁠string

        One of: "altered", "livedns_conflict", "livedns_done", "livedns_error", "unknown"

        DNS zone validity when last checked
      • last_checked_status ⁠string

        One of: "altered", "livedns_conflict", "livedns_done", "livedns_error", "unknown"

        DNS zone validity when last checked
      • txt ⁠string
        TXT entry that needs to be present in your DNS zone to validate domain ownership.
      Optional
      • last_checked_at ⁠datetime
        Date of the last check for zone validity
      • last_checked_at ⁠datetime
        Date of the last check for zone validity
    • status ⁠string

      One of: "being_created", "running", "being_deleted", "locked", "waiting_ownership", "ownership_validated", "validation_failed"

    Optional
    • application ⁠object

      With the following properties:

      • name ⁠string
      • name ⁠string
      • status ⁠string

        One of: "error", "running", "being_created", "cancelled"

      Optional
      • parameters ⁠object
      • parameters ⁠object
    • deployment ⁠object

      With the following properties:

      • git ⁠object

        With the following properties:

        • deploy_command ⁠string
        • remote_command ⁠string
        • url ⁠string
      • sftp ⁠object

        With the following properties:

        • directory ⁠string
          Directory relative to the SFTP root where the vhost is located.
        • document_root ⁠string
          Directory relative to the SFTP root where the root of the exposed vhost is located.
        • server ⁠string
        • url ⁠string
    • https_strategy ⁠string

      One of: "HTTP_only", "allow_HTTP_and_HTTPS", "redirect_HTTP_to_HTTPS"

      Describes the strategy used regarding secure connection to your vhost (HTTP/HTTPS). This field is only present if you have a certificate.
    • tls_validated_at ⁠datetime
      The last time Gandi successfully checked the connectivity to your vhost through TLS.

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

patch Update a vhost

This route is used to update a vhost

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
    • vhost_fqdn ⁠string
      fqdn of a vhost.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key
Body
  • application/json
    ⁠object

    With the following properties:

    Optional
    • application ⁠object

      With the following properties:

      Required
      • name ⁠string
      Optional
      • parameters ⁠object
    • https_strategy ⁠string

      One of: "HTTP_only", "allow_HTTP_and_HTTPS", "redirect_HTTP_to_HTTPS"

      Describes the strategy used regarding secure connection to your vhost (HTTP/HTTPS). This field is only present if you have a certificate.
    • linked_dns_zone ⁠object

      With the following properties:

      Required
      • allow_alteration ⁠boolean
        True if you authorized Gandi to modify your DNS zone so that your vhost points to our Web Hosting public endpoints. If set to True and your DNS zone is managed by our liveDNS platform, you will not have to manually change your DNS configuration to validate your vhost ownership. Check last_checked_status to validate.
      Optional
      • allow_alteration_override ⁠boolean

        Default: false

        True to override your DNS zone if there already is a record to link your instance to your vhost fqdn.

Responses

200

Body
  • application/json
    ⁠object

    With the following properties:

    • fqdn ⁠string
      fqdn of the vhost.
    • https_strategy ⁠string

      One of: "HTTP_only", "allow_HTTP_and_HTTPS", "redirect_HTTP_to_HTTPS"

      Describes the strategy used regarding secure connection to your vhost (HTTP/HTTPS). This field is only present if you have a certificate.
    • linked_dns_zone ⁠object

      With the following properties:

      • allow_alteration ⁠boolean
        True if you authorized Gandi to modify your DNS zone so that your vhost points to our Web Hosting public endpoints. If set to True and your DNS zone is managed by our liveDNS platform, you will not have to manually change your DNS configuration to validate your vhost ownership. Check last_checked_status to validate.
      • last_checked_status ⁠string

        One of: "altered", "livedns_conflict", "livedns_done", "livedns_error", "unknown"

        DNS zone validity when last checked
    • status ⁠string

      One of: "being_created", "running", "being_deleted", "locked", "waiting_ownership", "ownership_validated", "validation_failed"

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

delete Delete a vhost

This route is used to delete a vhost of an instance.

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
    • vhost_fqdn ⁠string
      fqdn of a vhost.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

204

Vhost is deleted

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Web Hosting vhost cache information

https://api.gandi.net/v5/simplehosting/instances/{instance_id}/vhosts/{vhost_fqdn}/cache

delete Purge a vhost's cache

This route is used to purge the cache of a Web Hosting vhost

Request

URI Parameters
    • instance_id ⁠string
      UUID of an instance.
    • vhost_fqdn ⁠string
      fqdn of a vhost.
Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

204

Vhost's cache is purged

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    ⁠object

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorization ⁠string
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key