openapi: 3.0.0
info:
  title: Web Hosting API
  description: "Scaleway provides several Web Hosting plans for individuals, professionals,
    and everyone in between. Our Web Hosting plans include:\n\n- A domain name\n-
    A configurable webhosting service\n- The management of your emails, including
    anti-spam, antivirus and filter systems\n- Unlimited sub-domains\n- An FTP account
    to upload your website\n- At least one database\n\n(switchcolumn)\n(switchcolumn)\n\n##
    Concepts\n\nRefer to our [dedicated concepts page](https://www.scaleway.com/en/docs/managed-services/webhosting/concepts/)
    to find definitions of all Web Hosting-related terminology.\n\n(switchcolumn)\n(switchcolumn)\n\n##
    Quickstart\n\n1. Configure your environment variables.\n\n    <Message type=\"note\">\n
    \   This is an optional step that seeks to simplify your usage of the Web Hosting
    API.\n    </Message>\n\n    ```bash\n    export SCW_SECRET_KEY=\"<API secret key>\"\n
    \   export SCW_PROJECT_ID=\"<Scaleway Project ID>\"\n    ```\n\n2. **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.\n\n
    \   ```bash\n    curl -X GET \\\n        -H \"X-Auth-Token: $SCW_SECRET_KEY\"
    \\\n        -H \"Content-Type: application/json\" \\\n        \"https://api.scaleway.com/webhosting/v1/regions/fr-par/offers?without_options=true\"
    | jq\n    ```\n\n    <Message type=\"note\">\n    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.\n    </Message>\n\n3. **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.\n\n    ```bash\n    curl -X POST \\\n        -H \"X-Auth-Token: $SCW_SECRET_KEY\"
    \\\n        -H \"Content-Type: application/json\" \\\n        \"https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings\"
    \\\n        -d '{\n        \"domain\": \"mydomain.net\",\n        \"offer_id\":
    \"f5c2ae8f-7625-4bca-b711-b44bb3d08694\",\n        \"project_id\": \"'\"$SCW_PROJECT_ID\"'\",\n
    \       \"tags\": [\"my-tag\"]\n    }'\n    ```\n\n    | Parameter        | Description
    \                                                                           |
    Valid values OR Example     | \n    |------------------|----------------------------------------------------------------------------------------|-----------------------------|\n
    \   | `domain`         | The 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`               |\n    | `offer_id`       | The offer ID of the desired
    offer. Use one of the offer IDs returned in step 2         |`f5c2ae8f-7625-4bca-b711-b44bb3d08694`
    |\n    | `project_id`     | The ID of the Scaleway Project to create the Web Hosting
    plan in.                      | `277ed74e-ea73-11ed-a05b-0242ac120003`                   |\n
    \   | `tags`           | Any tags you would like to associate with this Web Hosting
    plan                         | `my-tag`                   |\n\n\n    <Message
    type=\"tip\">\n    Once you've ordered your Web Hosting plan, check out our [dedicated
    documentation](https://www.scaleway.com/en/docs/managed-services/webhosting/quickstart/)
    to get started with your configuration.\n    </Message>\n\n\n4. **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.\n\n    ```bash\n    curl -X DELETE \\\n        -H \"Content-Type:
    application/json\" \\\n        -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n        \"https://api.scaleway.com/rest-of-endpoint/{hosting-id}\"\n
    \   ```\n\n(switchcolumn)       \n<Message type=\"requirement\">\n- You have a
    [Scaleway account](https://console.scaleway.com/)\n- You have created an [API
    key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/)
    and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/identity-and-access-management/iam/reference-content/permission-sets/)
    to perform the actions described on this page\n- You have [installed `curl`](https://curl.se/download.html)\n-
    You have [installaed `jq`](https://stedolan.github.io/jq/download/)\n</Message>\n(switchcolumn)\n\n##
    Technical information\n\nAll Scaleway Web Hosting plans now offer a choice between
    cPanel and Plesk for website management. Both tools provide a graphical interface
    and fast access icons, allowing you to configure and monitor your hosting solutions
    with ease. You can access cPanel or Plesk via the [Scaleway console](https://www.scaleway.com/en/docs/managed-services/webhosting/quickstart/#how-to-access-the-web-hosting-control-panel-from-the-scaleway-console).\n\n\n###
    Regions\n\nThe 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.\n\nScaleway Web Hosting is available only in the `fr-par` region.
    \n\n## Going further\n\nFor more help using Scaleway Web Hosting, check out the
    following resources:\n- Our [main documentation](https://www.scaleway.com/en/docs/managed-services/webhosting/)\n-
    The #webhosting-early-access channel on our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)\n-
    Our [support ticketing system](https://www.scaleway.com/en/docs/console/my-account/how-to/open-a-support-ticket/)."
  version: v1
servers:
- url: https://api.scaleway.com
tags:
- name: Web Hosting
  description: |
    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
components:
  schemas:
    scaleway.webhosting.v1.Hosting:
      type: object
      properties:
        id:
          type: string
          description: ID of the Web Hosting plan.
        project_id:
          type: string
          description: ID of the Scaleway Project the Web Hosting plan belongs to.
        updated_at:
          type: string
          description: Date on which the Web Hosting plan was last updated. (RFC 3339
            format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        created_at:
          type: string
          description: Date on which the Web Hosting plan was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        status:
          type: string
          description: Status of the Web Hosting plan.
          enum:
          - unknown_status
          - delivering
          - ready
          - deleting
          - error
          - locked
          - migrating
          default: unknown_status
        domain:
          type: string
          description: Main domain associated with the Web Hosting plan.
        offer:
          type: object
          description: Details of the Web Hosting plan offer and options.
          properties:
            id:
              type: string
              description: Offer ID.
            name:
              type: string
              description: Offer name.
            billing_operation_path:
              type: string
              description: Unique identifier used for billing.
            options:
              type: array
              description: Options available for the offer.
              items:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Offer.Option'
            price:
              type: object
              description: Price of the offer.
              properties:
                currency_code:
                  type: string
                units:
                  type: integer
                  format: int64
                nanos:
                  type: integer
                  format: int32
              x-properties-order:
              - currency_code
              - units
              - nanos
            available:
              type: boolean
              description: If a hosting_id was specified in the call, defines whether
                the offer is available for a specified hosting plan to migrate (update)
                to.
            control_panel_name:
              type: string
              description: Name of the control panel.
            end_of_life:
              type: boolean
              description: Indicates if the offer has reached its end of life.
            quota_warning:
              type: string
              description: Defines a warning if the maximum value for an option in
                the offer is exceeded.
              enum:
              - unknown_warning
              - quota_exceeded_warning
              - usage_low_warning
              default: unknown_warning
          x-properties-order:
          - id
          - name
          - billing_operation_path
          - options
          - price
          - available
          - control_panel_name
          - end_of_life
          - quota_warning
        platform:
          type: object
          description: Details of the hosting platform.
          properties:
            hostname:
              type: string
              description: Hostname of the host platform.
            number:
              type: integer
              description: Number of the host platform.
              format: int32
            group_name:
              type: string
              description: Group name of the hosting's host platform.
              enum:
              - unknown_group
              - default
              - premium
              default: unknown_group
            ipv4:
              type: string
              description: IPv4 address of the hosting's host platform. (IPv4 address)
              example: 1.2.3.4
            ipv6:
              type: string
              description: IPv6 address of the hosting's host platform. (IPv6 address)
              example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
            control_panel:
              type: object
              description: Details of the platform control panel.
              properties:
                name:
                  type: string
                  description: Name of the control panel.
                urls:
                  type: object
                  description: URL to connect to cPanel dashboard and to Webmail interface.
                  properties:
                    dashboard:
                      type: string
                      description: URL to connect to the hosting control panel dashboard.
                    webmail:
                      type: string
                      description: URL to connect to the hosting Webmail interface.
                  x-properties-order:
                  - dashboard
                  - webmail
              x-properties-order:
              - name
              - urls
          x-properties-order:
          - hostname
          - number
          - group_name
          - ipv4
          - ipv6
          - control_panel
        tags:
          type: array
          description: List of tags associated with the Web Hosting plan.
          items:
            type: string
        dns_status:
          type: string
          description: DNS status of the Web Hosting plan.
          deprecated: true
          enum:
          - unknown_status
          - valid
          - invalid
          default: unknown_status
        ipv4:
          type: string
          description: Current IPv4 address of the hosting. (IPv4 address)
          example: 1.2.3.4
        protected:
          type: boolean
          description: Whether the hosting is protected or not.
        user:
          type: object
          description: Details of the hosting user.
          properties:
            username:
              type: string
              description: Main Web Hosting cPanel username.
            one_time_password:
              type: string
              description: One-time-password used for the first login or reset password,
                empty after first use.
            contact_email:
              type: string
              description: Contact email used for the hosting.
          x-properties-order:
          - username
          - one_time_password
          - contact_email
        domain_status:
          type: string
          description: Main domain status of the Web Hosting plan.
          enum:
          - unknown_status
          - valid
          - invalid
          - validating
          - error
          x-enum-descriptions:
            values:
              unknown_status: The status of the domain is unknown.
              valid: The domain is valid and operational.
              invalid: The domain is invalid, potentially due to incorrect settings
                or configuration issues.
              validating: The domain is in the process of being validated.
              error: The domain is in an error status, it should be checked in Domain&DNS.
          default: unknown_status
        region:
          type: string
          description: Region where the Web Hosting plan is hosted.
      x-properties-order:
      - id
      - project_id
      - updated_at
      - created_at
      - status
      - domain
      - offer
      - platform
      - tags
      - dns_status
      - ipv4
      - protected
      - user
      - domain_status
      - region
    scaleway.webhosting.v1.Hosting.Status:
      type: string
      enum:
      - unknown_status
      - delivering
      - ready
      - deleting
      - error
      - locked
      - migrating
      default: unknown_status
    scaleway.webhosting.v1.HostingSummary:
      type: object
      properties:
        id:
          type: string
          description: ID of the Web Hosting plan.
        project_id:
          type: string
          description: ID of the Scaleway Project the Web Hosting plan belongs to.
        created_at:
          type: string
          description: Date on which the Web Hosting plan was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Date on which the Web Hosting plan was last updated. (RFC 3339
            format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        status:
          type: string
          description: Status of the Web Hosting plan.
          enum:
          - unknown_status
          - delivering
          - ready
          - deleting
          - error
          - locked
          - migrating
          default: unknown_status
        domain:
          type: string
          description: Main domain associated with the Web Hosting plan.
        protected:
          type: boolean
          description: Whether the hosting is protected or not.
        dns_status:
          type: string
          description: DNS status of the Web Hosting plan.
          deprecated: true
          enum:
          - unknown_status
          - valid
          - invalid
          default: unknown_status
        offer_name:
          type: string
          description: Name of the active offer for the Web Hosting plan.
        domain_status:
          type: string
          description: Main domain status of the Web Hosting plan.
          enum:
          - unknown_status
          - valid
          - invalid
          - validating
          - error
          x-enum-descriptions:
            values:
              unknown_status: The status of the domain is unknown.
              valid: The domain is valid and operational.
              invalid: The domain is invalid, potentially due to incorrect settings
                or configuration issues.
              validating: The domain is in the process of being validated.
              error: The domain is in an error status, it should be checked in Domain&DNS.
          default: unknown_status
        region:
          type: string
          description: Region where the Web Hosting plan is hosted.
      x-properties-order:
      - id
      - project_id
      - created_at
      - updated_at
      - status
      - domain
      - protected
      - dns_status
      - offer_name
      - domain_status
      - region
    scaleway.webhosting.v1.ListHostingsResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Number of Web Hosting plans returned.
          format: uint64
        hostings:
          type: array
          description: List of Web Hosting plans.
          items:
            $ref: '#/components/schemas/scaleway.webhosting.v1.HostingSummary'
      x-properties-order:
      - total_count
      - hostings
    scaleway.webhosting.v1.Offer.Option:
      type: object
      properties:
        id:
          type: string
          description: Option ID.
        name:
          type: string
          description: Name of the option.
          enum:
          - unknown_name
          - domain_count
          - email_count
          - storage_gb
          - vcpu_count
          - ram_gb
          - backup
          - dedicated_ip
          - email_storage_gb
          - database_count
          - support
          default: unknown_name
        billing_operation_path:
          type: string
          description: Unique identifier used for billing.
        min_value:
          type: integer
          description: Minimum value for the option in the offer.
          format: int32
        current_value:
          type: integer
          description: If a hosting_id was specified in the call, defines the current
            value of the option in the hosting.
          format: int32
        max_value:
          type: integer
          description: Maximum value for the option in the offer.
          format: int32
        quota_warning:
          type: string
          description: Defines a warning if the maximum value for the option has been
            reached.
          enum:
          - unknown_warning
          - quota_exceeded_warning
          - usage_low_warning
          default: unknown_warning
        price:
          type: object
          description: Price of the option for 1 value.
          properties:
            currency_code:
              type: string
            units:
              type: integer
              format: int64
            nanos:
              type: integer
              format: int32
          x-properties-order:
          - currency_code
          - units
          - nanos
      x-properties-order:
      - id
      - name
      - billing_operation_path
      - min_value
      - current_value
      - max_value
      - quota_warning
      - price
    scaleway.webhosting.v1.OfferOptionRequest:
      type: object
      properties:
        id:
          type: string
          description: Offer option ID.
        quantity:
          type: integer
          description: The option requested quantity to set for the Web Hosting plan.
          format: int64
      x-properties-order:
      - id
      - quantity
    scaleway.webhosting.v1.ResetHostingPasswordResponse:
      type: object
      properties:
        one_time_password:
          type: string
          description: New temporary password.
      x-properties-order:
      - one_time_password
    scaleway.webhosting.v1.ResourceSummary:
      type: object
      properties:
        databases_count:
          type: integer
          description: Total number of active databases in the Web Hosting plan.
          format: uint32
        mail_accounts_count:
          type: integer
          description: Total number of active email accounts in the Web Hosting plan.
          format: uint32
        ftp_accounts_count:
          type: integer
          description: Total number of active FTP accounts in the Web Hosting plan.
          format: uint32
        websites_count:
          type: integer
          description: Total number of active domains in the Web Hosting plan.
          format: uint32
      x-properties-order:
      - databases_count
      - mail_accounts_count
      - ftp_accounts_count
      - websites_count
    scaleway.webhosting.v1.Session:
      type: object
      properties:
        url:
          type: string
          description: Logged user's session URL.
      x-properties-order:
      - url
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /webhosting/v1/regions/{region}/hostings:
    get:
      tags:
      - Web Hosting
      operationId: ListHostings
      summary: List all Web Hosting plans
      description: List all of your existing Web Hosting plans. Various filters are
        available to limit the results, including filtering by domain, status, tag
        and Project ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number to return, from the paginated results (must be a
          positive integer).
        schema:
          type: integer
          description: Page number to return, from the paginated results (must be
            a positive integer).
          format: int32
      - in: query
        name: page_size
        description: Number of Web Hosting plans to return (must be a positive integer
          lower or equal to 100).
        schema:
          type: integer
          description: Number of Web Hosting plans to return (must be a positive integer
            lower or equal to 100).
          format: uint32
      - in: query
        name: order_by
        description: Sort order for Web Hosting plans in the response.
        schema:
          type: string
          description: Sort order for Web Hosting plans in the response.
          enum:
          - created_at_asc
          - created_at_desc
          default: created_at_asc
      - in: query
        name: tags
        description: Tags to filter for, only Web Hosting plans with matching tags
          will be returned.
        schema:
          type: array
          description: Tags to filter for, only Web Hosting plans with matching tags
            will be returned.
          items:
            type: string
      - in: query
        name: statuses
        description: Statuses to filter for, only Web Hosting plans with matching
          statuses will be returned.
        schema:
          type: array
          description: Statuses to filter for, only Web Hosting plans with matching
            statuses will be returned.
          items:
            $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting.Status'
      - in: query
        name: domain
        description: Domain to filter for, only Web Hosting plans associated with
          this domain will be returned.
        schema:
          type: string
          description: Domain to filter for, only Web Hosting plans associated with
            this domain will be returned.
      - in: query
        name: project_id
        description: Project ID to filter for, only Web Hosting plans from this Project
          will be returned.
        schema:
          type: string
          description: Project ID to filter for, only Web Hosting plans from this
            Project will be returned.
      - in: query
        name: organization_id
        description: Organization ID to filter for, only Web Hosting plans from this
          Organization will be returned.
        schema:
          type: string
          description: Organization ID to filter for, only Web Hosting plans from
            this Organization will be returned.
      - in: query
        name: control_panels
        description: Name of the control panel to filter for, only Web Hosting plans
          from this control panel will be returned.
        schema:
          type: array
          description: Name of the control panel to filter for, only Web Hosting plans
            from this control panel will be returned.
          items:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.ListHostingsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Web Hosting
      operationId: CreateHosting
      summary: Order a Web Hosting plan
      description: Order a Web Hosting plan, specifying the offer type required via
        the `offer_id` parameter.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                offer_id:
                  type: string
                  description: ID of the selected offer for the Web Hosting plan.
                project_id:
                  type: string
                  description: ID of the Scaleway Project in which to create the Web
                    Hosting plan.
                email:
                  type: string
                  description: Contact email for the Web Hosting client.
                tags:
                  type: array
                  description: List of tags for the Web Hosting plan.
                  items:
                    type: string
                domain:
                  type: string
                  description: Domain name to link to the Web Hosting plan. You must
                    already own this domain name, and have completed the DNS validation
                    process beforehand.
                offer_options:
                  type: array
                  description: List of the Web Hosting plan options IDs with their
                    quantities.
                  items:
                    $ref: '#/components/schemas/scaleway.webhosting.v1.OfferOptionRequest'
                language:
                  type: string
                  description: Default language for the control panel interface.
                  enum:
                  - unknown_language_code
                  - en_US
                  - fr_FR
                  - de_DE
                  default: unknown_language_code
                domain_configuration:
                  type: object
                  description: Indicates whether to update hosting domain name servers
                    and DNS records for domains managed by Scaleway Elements (deprecated,
                    use auto_config_domain_dns instead).
                  deprecated: true
                  properties:
                    update_nameservers:
                      type: boolean
                    update_web_record:
                      type: boolean
                    update_mail_record:
                      type: boolean
                    update_all_records:
                      type: boolean
                  x-properties-order:
                  - update_nameservers
                  - update_web_record
                  - update_mail_record
                  - update_all_records
                skip_welcome_email:
                  type: boolean
                  description: Indicates whether to skip a welcome email to the contact
                    email containing hosting info.
                auto_config_domain_dns:
                  type: object
                  description: Indicates whether to update hosting domain name servers
                    and DNS records for domains managed by Scaleway Elements (deprecated,
                    use auto_update_* fields instead).
                  properties:
                    nameservers:
                      type: boolean
                      description: Whether or not to synchronize domain nameservers.
                    web_records:
                      type: boolean
                      description: Whether or not to synchronize web records.
                    mail_records:
                      type: boolean
                      description: Whether or not to synchronize mail records.
                    all_records:
                      type: boolean
                      description: Whether or not to synchronize all types of records.
                        Takes priority over the other fields.
                    none:
                      type: boolean
                      description: No automatic domain configuration. Users must configure
                        their domain for the Web Hosting to work.
                  x-properties-order:
                  - nameservers
                  - web_records
                  - mail_records
                  - all_records
                  - none
              x-properties-order:
              - offer_id
              - project_id
              - email
              - tags
              - domain
              - offer_options
              - language
              - domain_configuration
              - skip_welcome_email
              - auto_config_domain_dns
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "domain": "string",
              "email": "string",
              "offer_id": "string",
              "project_id": "string"
            }' \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings" \
            X-Auth-Token:$SCW_SECRET_KEY \
            domain="string" \
            email="string" \
            offer_id="string" \
            project_id="string"
  /webhosting/v1/regions/{region}/hostings/{hosting_id}:
    get:
      tags:
      - Web Hosting
      operationId: GetHosting
      summary: Get a Web Hosting plan
      description: Get the details of one of your existing Web Hosting plans, specified
        by its `hosting_id`.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID.
        required: true
        schema:
          type: string
          description: Hosting ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Web Hosting
      operationId: UpdateHosting
      summary: Update a Web Hosting plan
      description: Update the details of one of your existing Web Hosting plans, specified
        by its `hosting_id`. You can update parameters including the contact email
        address, tags, options and offer.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID.
        required: true
        schema:
          type: string
          description: Hosting ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: New contact email for the Web Hosting plan.
                tags:
                  type: array
                  description: New tags for the Web Hosting plan.
                  nullable: true
                  items:
                    type: string
                offer_options:
                  type: array
                  description: List of the Web Hosting plan options IDs with their
                    quantities.
                  items:
                    $ref: '#/components/schemas/scaleway.webhosting.v1.OfferOptionRequest'
                offer_id:
                  type: string
                  description: ID of the new offer for the Web Hosting plan.
                protected:
                  type: boolean
                  description: Whether the hosting is protected or not.
              x-properties-order:
              - email
              - tags
              - offer_options
              - offer_id
              - protected
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Web Hosting
      operationId: DeleteHosting
      summary: Delete a Web Hosting plan
      description: 'Delete a Web Hosting plan, specified by its `hosting_id`. Note
        that deletion is not immediate: it will take place at the end of the calendar
        month, after which time your Web Hosting plan and all its data (files and
        emails) will be irreversibly lost.'
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID.
        required: true
        schema:
          type: string
          description: Hosting ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/reset-password:
    post:
      tags:
      - Web Hosting
      operationId: ResetHostingPassword
      summary: Reset a Web Hosting plan password
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: UUID of the hosting.
        required: true
        schema:
          type: string
          description: UUID of the hosting.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.ResetHostingPasswordResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}/reset-password"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}/reset-password" \
            X-Auth-Token:$SCW_SECRET_KEY
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/resource-summary:
    get:
      tags:
      - Web Hosting
      operationId: GetResourceSummary
      summary: Get the total counts of websites, databases, email accounts, and FTP
        accounts of a Web Hosting plan
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID.
        required: true
        schema:
          type: string
          description: Hosting ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.ResourceSummary'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}/resource-summary"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}/resource-summary" \
            X-Auth-Token:$SCW_SECRET_KEY
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/sessions:
    post:
      tags:
      - Web Hosting
      operationId: CreateSession
      summary: Create a user session
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID.
        required: true
        schema:
          type: string
          description: Hosting ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Session'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}/sessions"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings/{hosting_id}/sessions" \
            X-Auth-Token:$SCW_SECRET_KEY
