openapi: 3.1.0
info:
  title: Data Warehouse API
  description: |-
    Data Warehouse for ClickHouse® is a centralized repository to store large sets of structured data, to streamline analysis and reporting for data science and business intelligence.

    ## Concepts

    Refer to our [dedicated concepts page](https://www.scaleway.com/en/docs/data-warehouse/concepts/) to find definitions of terms related to Data Warehouse for ClickHouse®.

    ## Quickstart

    1. Configure your environment variables.

       <Message type="note">
       This is an optional step that seeks to simplify your usage of the Data Warehouse API.
       </Message>

        ```bash
        export SCW_SECRET_KEY="<API secret key>"
        export SCW_DEFAULT_ZONE="<Scaleway default Availability Zone>"
        export SCW_DEFAULT_REGION="<Scaleway default region>"
        export SCW_PROJECT_ID="<Scaleway Project ID>"
        ```

    2. **Create a deployment**: run the following command to create a deployment. You can customize the details in the payload to your needs, using the table below to help.

        ```bash
        curl -X POST \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          -H "Content-Type: application/json" \
          -d '{
            "cpu_max": 1,
            "cpu_min": 4,
            "name": "MyDeployment",
            "password": "string",
            "project_id": $SCW_PROJECT_ID,
          }' \
          "https://api.scaleway.com/datawarehouse/v1beta1/regions/fr-par/deployments"
        ```

    3. **Get a list of your deployments**: run the following command to get a list of all the deployments in your account, with their details:

        ```bash
        curl -X GET \
          -H "Content-Type: application/json" \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/datawarehouse/v1beta1/regions/fr-par/deployments"
        ```

    4. **Delete your deployment**: run the following command to delete a deployment. Ensure that you replace `{resource-id}` in the URL with the ID of the deployment you want to delete.

        ```bash
        curl -X DELETE \
          -H "Content-Type: application/json" \
          -H "X-Auth-Token: $SCW_SECRET_KEY" \
          "https://api.scaleway.com/datawarehouse/v1beta1/regions/fr-par/deployments/{resource-id}"
        ```

    <Message type="requirement">
    - You have a [Scaleway account](https://console.scaleway.com/)
    - You have created an [API key](https://www.scaleway.com/en/docs/iam/how-to/create-api-keys/) and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/iam/reference-content/permission-sets/) to perform the actions described on this page
    - You have [installed `curl`](https://curl.se/download.html)
    </Message>

    ## Going further

    For more help using Scaleway Data Warehouse for ClickHouse®, check out the following resources:

    - Our [main documentation](https://www.scaleway.com/en/docs/data-warehouse/)
    - The #data-warehouse-beta channel on our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)
    - Our [support ticketing system](https://www.scaleway.com/en/docs/account/how-to/open-a-support-ticket/).
  version: v1beta1
servers:
- url: https://api.scaleway.com
tags:
- name: Deployments
  description: |
    A deployment is composed of one or multiple replicas.
- name: Presets
  description: |
    Data Warehouse preset to help you choose the best configuration.
- name: Deployment Versions
  description: |
    ClickHouse® versions powering your deployment.
- name: User Management
  description: |
    Manage users associated with a deployment.
- name: Database Management
  description: |
    Manage databases within a deployment.
- name: Endpoint Management
  description: |
    Manage endpoints associated with a deployment.
components:
  schemas:
    scaleway.datawarehouse.v1beta1.Database:
      type: object
      properties:
        name:
          type: string
          description: Name of the database.
        size:
          type: integer
          description: Size of the database. (in bytes)
          format: uint64
        deployment_id:
          type: string
          description: Identifier of the deployment. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        region:
          type: string
          description: Region of the deployment.
      x-properties-order:
      - name
      - size
      - deployment_id
      - region
    scaleway.datawarehouse.v1beta1.Deployment:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        name:
          type: string
          description: Name of the deployment.
        organization_id:
          type: string
          description: Organization ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        project_id:
          type: string
          description: Project ID. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        status:
          description: Status of the deployment.
          $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Deployment.Status'
        tags:
          type: array
          description: List of tags applied to the deployment.
          items:
            type: string
        created_at:
          type:
          - string
          - "null"
          description: Creation date of the deployment. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        updated_at:
          type:
          - string
          - "null"
          description: Last modification date of the deployment. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
        version:
          type: string
          description: ClickHouse® version.
        replica_count:
          type: integer
          description: Number of replicas for the deployment.
          format: uint32
        shard_count:
          type: integer
          description: Number of shards for the deployment.
          format: uint32
        cpu_min:
          type: integer
          description: Minimum CPU count for the deployment.
          format: uint32
        cpu_max:
          type: integer
          description: Maximum CPU count for the deployment.
          format: uint32
        endpoints:
          type: array
          description: List of endpoints associated with the deployment.
          items:
            $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Endpoint'
        ram_per_cpu:
          type: integer
          description: RAM per CPU count for the deployment (in GB).
          format: uint32
        move_factor:
          type: number
          description: For the `tiered` storage policy, controls when data is moved
            from the hot volume (Block Storage) to the cold volume (Object Storage).
            Data is moved once free space on the hot volume drops below this fraction
            of its capacity. Value between 0 and 1 (default 0.1, i.e. data is moved
            when the hot volume is 90% full).
          format: double
        region:
          type: string
          description: Region of the deployment.
      x-properties-order:
      - id
      - name
      - organization_id
      - project_id
      - status
      - tags
      - created_at
      - updated_at
      - version
      - replica_count
      - shard_count
      - cpu_min
      - cpu_max
      - endpoints
      - ram_per_cpu
      - move_factor
      - region
    scaleway.datawarehouse.v1beta1.Deployment.Status:
      type: string
      enum:
      - unknown_status
      - ready
      - creating
      - configuring
      - deleting
      - error
      - locked
      - locking
      - unlocking
      - deploying
      - stopping
      - starting
      - stopped
      default: unknown_status
    scaleway.datawarehouse.v1beta1.Endpoint:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the endpoint. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        dns_record:
          type: string
          description: DNS record associated with the endpoint.
        services:
          type: array
          description: List of services associated with the endpoint.
          items:
            $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Endpoint.Service'
        private_network:
          description: Private Network endpoint details.
          x-one-of: details
          oneOf:
          - $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.PrivateNetworkDetails'
          - type: "null"
        public:
          description: Public endpoint details.
          x-one-of: details
          oneOf:
          - $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Endpoint.PublicDetails'
          - type: "null"
        region:
          type: string
          description: Region of the deployment.
      x-properties-order:
      - id
      - dns_record
      - services
      - private_network
      - public
      - region
    scaleway.datawarehouse.v1beta1.Endpoint.PublicDetails:
      type: object
    scaleway.datawarehouse.v1beta1.Endpoint.Service:
      type: object
      properties:
        protocol:
          $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Endpoint.Service.Protocol'
        port:
          type: integer
          format: uint32
      x-properties-order:
      - protocol
      - port
    scaleway.datawarehouse.v1beta1.Endpoint.Service.Protocol:
      type: string
      enum:
      - unknown_protocol
      - tcp
      - https
      - mysql
      default: unknown_protocol
    scaleway.datawarehouse.v1beta1.EndpointSpec:
      type: object
      properties:
        public:
          x-one-of: details
          oneOf:
          - $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.EndpointSpec.PublicDetails'
          - type: "null"
        private_network:
          x-one-of: details
          oneOf:
          - $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.EndpointSpec.PrivateNetworkSummary'
          - type: "null"
      x-properties-order:
      - public
      - private_network
    scaleway.datawarehouse.v1beta1.EndpointSpec.PrivateNetworkSummary:
      type: object
      properties:
        private_network_id:
          type: string
          description: UUID of the Private Network.
      x-properties-order:
      - private_network_id
    scaleway.datawarehouse.v1beta1.EndpointSpec.PublicDetails:
      type: object
    scaleway.datawarehouse.v1beta1.ListDatabasesRequest.OrderBy:
      type: string
      enum:
      - name_asc
      - name_desc
      - size_asc
      - size_desc
      default: name_asc
    scaleway.datawarehouse.v1beta1.ListDatabasesResponse:
      type: object
      properties:
        databases:
          type: array
          description: List of databases associated with the deployment.
          items:
            $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Database'
        total_count:
          type: integer
          description: Total count of databases associated with the deployment.
          format: uint32
      x-properties-order:
      - databases
      - total_count
    scaleway.datawarehouse.v1beta1.ListDeploymentsRequest.OrderBy:
      type: string
      enum:
      - created_at_desc
      - created_at_asc
      - name_asc
      - name_desc
      default: created_at_desc
    scaleway.datawarehouse.v1beta1.ListDeploymentsResponse:
      type: object
      properties:
        deployments:
          type: array
          description: List of all deployments available in an Organization or Project.
          items:
            $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Deployment'
        total_count:
          type: integer
          description: Total count of deployments available in an Organization or
            Project.
          format: uint64
      x-properties-order:
      - deployments
      - total_count
    scaleway.datawarehouse.v1beta1.ListPresetsResponse:
      type: object
      properties:
        presets:
          type: array
          description: List of available presets.
          items:
            $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Preset'
        total_count:
          type: integer
          description: Total count of presets available.
          format: uint64
      x-properties-order:
      - presets
      - total_count
    scaleway.datawarehouse.v1beta1.ListUsersRequest.OrderBy:
      type: string
      enum:
      - name_asc
      - name_desc
      default: name_asc
    scaleway.datawarehouse.v1beta1.ListUsersResponse:
      type: object
      properties:
        users:
          type: array
          description: List of users associated with the deployment.
          items:
            $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.User'
        total_count:
          type: integer
          description: Total count of users associated with the deployment.
          format: uint64
      x-properties-order:
      - users
      - total_count
    scaleway.datawarehouse.v1beta1.ListVersionsResponse:
      type: object
      properties:
        versions:
          type: array
          description: Available deployment version.
          items:
            $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Version'
        total_count:
          type: integer
          description: Total count of deployment version available.
          format: uint64
      x-properties-order:
      - versions
      - total_count
    scaleway.datawarehouse.v1beta1.NodePrivateNetworkDetails:
      type: object
      properties:
        node_name:
          type: string
          description: Name  of the node.
        shard:
          type: integer
          description: The ClickHouse shard to which the node belongs to.
          format: uint32
        replica:
          type: integer
          description: The ClickHouse replica to which the node belongs to.
          format: uint32
        ip_address:
          type: string
          description: Private static IP address of that node.
      x-properties-order:
      - node_name
      - shard
      - replica
      - ip_address
    scaleway.datawarehouse.v1beta1.Preset:
      type: object
      properties:
        name:
          type: string
          description: Name of the preset.
        category:
          type: string
          description: Category of the preset.
        cpu_min:
          type: integer
          description: Minimum CPU count for the preset.
          format: uint32
        cpu_max:
          type: integer
          description: Maximum CPU count for the preset.
          format: uint32
        ram_per_cpu:
          type: integer
          description: RAM per CPU count for the preset (in GB).
          format: uint32
        replica_count:
          type: integer
          description: Number of replicas for the preset.
          format: uint32
        shard_count:
          type: integer
          description: Number of shards for the preset.
          format: uint32
      x-properties-order:
      - name
      - category
      - cpu_min
      - cpu_max
      - ram_per_cpu
      - replica_count
      - shard_count
    scaleway.datawarehouse.v1beta1.PrivateNetworkDetails:
      type: object
      properties:
        private_network_id:
          type: string
          description: UUID of the Private Network.
        nodes:
          type: array
          description: List of nodes belonging to this private network and their details.
          items:
            $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.NodePrivateNetworkDetails'
      x-properties-order:
      - private_network_id
      - nodes
    scaleway.datawarehouse.v1beta1.User:
      type: object
      properties:
        name:
          type: string
          description: Name of the user.
        is_admin:
          type: boolean
          description: Indicates if the user is an administrator.
        deployment_id:
          type: string
          description: Identifier of the deployment. (UUID format)
          example: 6170692e-7363-616c-6577-61792e636f6d
        region:
          type: string
          description: Region of the deployment.
      x-properties-order:
      - name
      - is_admin
      - deployment_id
      - region
    scaleway.datawarehouse.v1beta1.Version:
      type: object
      properties:
        version:
          type: string
          description: Deployment version.
        end_of_life_at:
          type:
          - string
          - "null"
          description: Date of End of Life. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
      x-properties-order:
      - version
      - end_of_life_at
    scaleway.std.File:
      type: object
      properties:
        name:
          type: string
        content_type:
          type: string
        content:
          type: string
      x-properties-order:
      - name
      - content_type
      - content
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /datawarehouse/v1beta1/regions/{region}/deployments:
    get:
      tags:
      - Deployments
      operationId: ListDeployments
      summary: List deployments
      description: List all deployments in the specified region, for a given Scaleway
        Project. By default, the deployments returned in the list are ordered by creation
        date in ascending order, though this can be modified via the order_by field.
        You can define additional parameters for your query, such as `tags` and `name`.
        For the `name` parameter, the value you provide will be checked against the
        whole name string to see if it includes the string you put in the parameter.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: query
        name: tags
        description: List deployments with a given tag.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: name
        description: Lists deployments that match a name pattern.
        schema:
          type: string
      - in: query
        name: order_by
        description: Criteria to use when ordering deployment listings.
        schema:
          $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.ListDeploymentsRequest.OrderBy'
      - in: query
        name: organization_id
        description: Organization ID the deployment belongs to. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: project_id
        description: Project ID the deployment belongs to. (UUID format)
        schema:
          type: string
          example: 6170692e-7363-616c-6577-61792e636f6d
      - in: query
        name: page
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.ListDeploymentsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Deployments
      operationId: CreateDeployment
      summary: Create a deployment
      description: Create a new deployment.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Deployment'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: string
                  description: The Project ID on which the deployment will be created.
                name:
                  type: string
                  description: Name of the deployment.
                tags:
                  type: array
                  description: Tags to apply to the deployment.
                  items:
                    type: string
                version:
                  type: string
                  description: ClickHouse® version to use for the deployment.
                replica_count:
                  type: integer
                  description: Number of replicas for the deployment.
                  format: uint32
                shard_count:
                  type:
                  - integer
                  - "null"
                  description: Number of shard for the deployment.
                  format: uint32
                password:
                  type: string
                  description: Password for the initial user.
                cpu_min:
                  type: integer
                  description: Minimum CPU count for the deployment.
                  format: uint32
                cpu_max:
                  type: integer
                  description: Maximum CPU count for the deployment.
                  format: uint32
                endpoints:
                  type: array
                  description: Endpoints to associate with the deployment.
                  items:
                    $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.EndpointSpec'
                ram_per_cpu:
                  type: integer
                  description: RAM per CPU count for the deployment (in GB).
                  format: uint32
                move_factor:
                  type:
                  - number
                  - "null"
                  description: For the `tiered` storage policy, controls when data
                    is moved from the hot volume (Block Storage) to the cold volume
                    (Object Storage). Data is moved once free space on the hot volume
                    drops below this fraction of its capacity. Value between 0 and
                    1 (default 0.1, i.e. data is moved when the hot volume is 90%
                    full).
                  format: double
              x-properties-order:
              - project_id
              - name
              - tags
              - version
              - replica_count
              - shard_count
              - password
              - cpu_min
              - cpu_max
              - endpoints
              - ram_per_cpu
              - move_factor
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "cpu_max": 42,
              "cpu_min": 42,
              "name": "string",
              "password": "string",
              "project_id": "string",
              "ram_per_cpu": 42,
              "replica_count": 42,
              "version": "string"
            }' \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments" \
            X-Auth-Token:$SCW_SECRET_KEY \
            cpu_max:=42 \
            cpu_min:=42 \
            name="string" \
            password="string" \
            project_id="string" \
            ram_per_cpu:=42 \
            replica_count:=42 \
            version="string"
  /datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}:
    get:
      tags:
      - Deployments
      operationId: GetDeployment
      summary: Get a deployment
      description: Retrieve information about a given deployment, specified by the
        `region` and `deployment_id` parameters. Its full details, including name,
        status are returned in the response object.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Deployment'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Deployments
      operationId: UpdateDeployment
      summary: Update a deployment
      description: Update the parameters of a deployment.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Deployment'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type:
                  - string
                  - "null"
                  description: Name of the deployment.
                tags:
                  type:
                  - array
                  - "null"
                  description: Tags of a deployment.
                cpu_min:
                  type:
                  - integer
                  - "null"
                  description: Minimum CPU count for the deployment.
                  format: uint32
                cpu_max:
                  type:
                  - integer
                  - "null"
                  description: Maximum CPU count for the deployment.
                  format: uint32
                replica_count:
                  type:
                  - integer
                  - "null"
                  description: Number of replicas for the deployment.
                  format: uint32
                move_factor:
                  type:
                  - number
                  - "null"
                  description: For the `tiered` storage policy, controls when data
                    is moved from the hot volume (Block Storage) to the cold volume
                    (Object Storage). Data is moved once free space on the hot volume
                    drops below this fraction of its capacity. Value between 0 and
                    1 (default 0.1, i.e. data is moved when the hot volume is 90%
                    full).
                  format: double
              x-properties-order:
              - name
              - tags
              - cpu_min
              - cpu_max
              - replica_count
              - move_factor
      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/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Deployments
      operationId: DeleteDeployment
      summary: Delete a deployment
      description: Delete a given deployment, specified by the `region` and `deployment_id`
        parameters. Deleting a deployment is permanent, and cannot be undone. Upon
        deletion, all your data will be lost.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment to delete.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Deployment'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/certificate:
    get:
      tags:
      - Deployments
      operationId: GetDeploymentCertificate
      summary: Get deployment TLS certificate
      description: Retrieve the TLS certificate associated with a deployment.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.std.File'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/certificate"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/certificate" \
            X-Auth-Token:$SCW_SECRET_KEY
  /datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/databases:
    get:
      tags:
      - Database Management
      operationId: ListDatabases
      summary: List databases within a deployment
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      - in: query
        name: name
        description: Name of the database to filter by.
        schema:
          type: string
      - in: query
        name: order_by
        description: Criteria to use when ordering database listings.
        schema:
          $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.ListDatabasesRequest.OrderBy'
      - in: query
        name: page
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.ListDatabasesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/databases"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/databases" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Database Management
      operationId: CreateDatabase
      summary: Create a new database within a deployment
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Database'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the database.
              x-properties-order:
              - name
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"name":"string"}' \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/databases"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/databases" \
            X-Auth-Token:$SCW_SECRET_KEY \
            name="string"
  /datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/databases/{name}:
    delete:
      tags:
      - Database Management
      operationId: DeleteDatabase
      summary: Delete a database from a deployment
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      - in: path
        name: name
        description: Name of the database to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/databases/{name}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/databases/{name}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/start:
    post:
      tags:
      - Deployments
      operationId: StartDeployment
      summary: Start a deployment
      description: Start a stopped deployment.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Deployment'
      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/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/start"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/start" \
            X-Auth-Token:$SCW_SECRET_KEY
  /datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/stop:
    post:
      tags:
      - Deployments
      operationId: StopDeployment
      summary: Stop a deployment
      description: Stop a running deployment.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Deployment'
      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/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/stop"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/stop" \
            X-Auth-Token:$SCW_SECRET_KEY
  /datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/users:
    get:
      tags:
      - User Management
      operationId: ListUsers
      summary: List users associated with a deployment
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      - in: query
        name: name
        description: Name of the user to filter by.
        schema:
          type: string
      - in: query
        name: order_by
        description: Criteria to use when ordering user listings.
        schema:
          $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.ListUsersRequest.OrderBy'
      - in: query
        name: page
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.ListUsersResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/users"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/users" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - User Management
      operationId: CreateUser
      summary: Create a new user for a deployment
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.User'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the user.
                password:
                  type: string
                  description: Password for the user.
                is_admin:
                  type: boolean
                  description: Indicates if the user is an administrator.
              x-properties-order:
              - name
              - password
              - is_admin
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "is_admin": false,
              "name": "string",
              "password": "string"
            }' \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/users"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/users" \
            X-Auth-Token:$SCW_SECRET_KEY \
            is_admin:=false \
            name="string" \
            password="string"
  /datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/users/{name}:
    patch:
      tags:
      - User Management
      operationId: UpdateUser
      summary: Update an existing user for a deployment
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      - in: path
        name: name
        description: Name of the user.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.User'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type:
                  - string
                  - "null"
                  description: New password for the user.
                is_admin:
                  type:
                  - boolean
                  - "null"
                  description: Updates the user administrator permissions.
              x-properties-order:
              - password
              - is_admin
      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/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/users/{name}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/users/{name}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - User Management
      operationId: DeleteUser
      summary: Delete a user from a deployment
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: deployment_id
        description: UUID of the deployment.
        required: true
        schema:
          type: string
      - in: path
        name: name
        description: Name of the user to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/users/{name}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/deployments/{deployment_id}/users/{name}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /datawarehouse/v1beta1/regions/{region}/endpoints:
    post:
      tags:
      - Endpoint Management
      operationId: CreateEndpoint
      summary: Create a new endpoint for a deployment
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.Endpoint'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                deployment_id:
                  type: string
                  description: UUID of the deployment.
                endpoint:
                  description: Endpoint specification.
                  $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.EndpointSpec'
              x-properties-order:
              - deployment_id
              - endpoint
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"deployment_id":"string"}' \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/endpoints"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/endpoints" \
            X-Auth-Token:$SCW_SECRET_KEY \
            deployment_id="string"
  /datawarehouse/v1beta1/regions/{region}/endpoints/{endpoint_id}:
    delete:
      tags:
      - Endpoint Management
      operationId: DeleteEndpoint
      summary: Delete an endpoint from a deployment
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: path
        name: endpoint_id
        description: UUID of the Endpoint to delete.
        required: true
        schema:
          type: string
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/endpoints/{endpoint_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/endpoints/{endpoint_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /datawarehouse/v1beta1/regions/{region}/presets:
    get:
      tags:
      - Presets
      operationId: ListPresets
      summary: List available presets
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: query
        name: page
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.ListPresetsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/presets"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/presets" \
            X-Auth-Token:$SCW_SECRET_KEY
  /datawarehouse/v1beta1/regions/{region}/versions:
    get:
      tags:
      - Deployment Versions
      operationId: ListVersions
      summary: List available ClickHouse® versions
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
      - in: query
        name: version
        schema:
          type: string
      - in: query
        name: page
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.datawarehouse.v1beta1.ListVersionsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/versions"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/datawarehouse/v1beta1/regions/{region}/versions" \
            X-Auth-Token:$SCW_SECRET_KEY
