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.\n\n(switchcolumn)\n(switchcolumn)\n\n## Concepts\n\nRefer
    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®.\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 Data Warehouse
    API.\n    </Message>\n\n    ```bash\n    export SCW_SECRET_KEY=\"<API secret key>\"\n
    \   export SCW_DEFAULT_ZONE=\"<Scaleway default Availability Zone>\"\n    export
    SCW_DEFAULT_REGION=\"<Scaleway default region>\"\n    export SCW_PROJECT_ID=\"<Scaleway
    Project ID>\"\n    ```\n\n2. **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.\n\n    ```bash\n    curl -X POST \\\n      -H \"X-Auth-Token:
    $SCW_SECRET_KEY\" \\\n      -H \"Content-Type: application/json\" \\\n      -d
    '{\n        \"cpu_max\": 1,\n        \"cpu_min\": 4,\n        \"name\": \"MyDeployment\",\n
    \       \"password\": \"string\",\n        \"project_id\": $SCW_PROJECT_ID,\n
    \     }' \\\n      \"https://api.scaleway.com/datawarehouse/v1beta1/regions/fr-par/deployments\"\n
    \   ```\n\n3. **Get a list of your deployments**: run the following command to
    get a list of all the deployments in your account, with their details:\n\n    ```bash\n
    \   curl -X GET \\\n      -H \"Content-Type: application/json\" \\\n      -H \"X-Auth-Token:
    $SCW_SECRET_KEY\" \\\n      \"https://api.scaleway.com/datawarehouse/v1beta1/regions/fr-par/deployments\"\n
    \   ```\n\n4. **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.\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/datawarehouse/v1beta1/regions/fr-par/deployments/{resource-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</Message>\n(switchcolumn)\n\n##
    Going further\n\nFor more help using Scaleway Data Warehouse for ClickHouse®,
    check out the following resources:\n- Our [main documentation](https://www.scaleway.com/en/docs/data-warehouse/)\n-
    The #data-warehouse-beta 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: 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
      x-properties-order:
      - name
      - size
    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:
          type: string
          description: Status of the deployment.
          enum:
          - unknown_status
          - ready
          - creating
          - configuring
          - deleting
          - error
          - locked
          - locking
          - unlocking
          default: unknown_status
        tags:
          type: array
          description: List of tags applied to the deployment.
          items:
            type: string
        created_at:
          type: string
          description: Creation date of the deployment. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Last modification date of the deployment. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        version:
          type: string
          description: ClickHouse® version.
        replica_count:
          type: integer
          description: Number of replicas 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
        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
      - cpu_min
      - cpu_max
      - endpoints
      - ram_per_cpu
      - region
    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:
          type: object
          description: Private Network endpoint details.
          properties:
            private_network_id:
              type: string
              description: (UUID format)
              example: 6170692e-7363-616c-6577-61792e636f6d
          nullable: true
          x-properties-order:
          - private_network_id
          x-one-of: details
        public:
          type: object
          description: Public endpoint details.
          nullable: true
          x-one-of: details
      x-properties-order:
      - id
      - dns_record
      - services
      - private_network
      - public
    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:
          type: object
          nullable: true
          x-one-of: details
        private_network:
          type: object
          properties:
            private_network_id:
              type: string
              description: UUID of the Private Network.
          nullable: true
          x-properties-order:
          - private_network_id
          x-one-of: details
      x-properties-order:
      - public
      - private_network
    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.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.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.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
      x-properties-order:
      - name
      - category
      - cpu_min
      - cpu_max
      - ram_per_cpu
      - replica_count
    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.
      x-properties-order:
      - name
      - is_admin
    scaleway.datawarehouse.v1beta1.Version:
      type: object
      properties:
        version:
          type: string
          description: Deployment version.
        end_of_life_at:
          type: string
          description: Date of End of Life. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
      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:
          type: string
          enum:
          - created_at_desc
          - created_at_asc
          - name_asc
          - name_desc
          default: created_at_desc
      - 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
                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
              x-properties-order:
              - project_id
              - name
              - tags
              - version
              - replica_count
              - password
              - cpu_min
              - cpu_max
              - endpoints
              - ram_per_cpu
      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
                  description: Name of the deployment.
                tags:
                  type: array
                  description: Tags of a deployment.
                  nullable: true
                  items:
                    type: string
                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
                replica_count:
                  type: integer
                  description: Number of replicas for the deployment.
                  format: uint32
              x-properties-order:
              - name
              - tags
              - cpu_min
              - cpu_max
              - replica_count
      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:
      operationId: GetDeploymentCertificate
      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
        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:
          type: string
          enum:
          - name_asc
          - name_desc
          - size_asc
          - size_desc
          default: name_asc
      - 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}/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:
          type: string
          enum:
          - name_asc
          - name_desc
          default: name_asc
      - 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
                  description: New password for the user.
                is_admin:
                  type: boolean
                  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:
                  type: object
                  description: Endpoint specification.
                  properties:
                    public:
                      type: object
                      nullable: true
                      x-one-of: details
                    private_network:
                      type: object
                      properties:
                        private_network_id:
                          type: string
                          description: UUID of the Private Network.
                      nullable: true
                      x-properties-order:
                      - private_network_id
                      x-one-of: details
                  x-properties-order:
                  - public
                  - private_network
              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
