openapi: 3.0.0
info:
  title: Product Catalog API
  description: |-
    The Product Catalog API provides methods to retrieve Scaleway's catalog of products and features.

    (switchcolumn)
    (switchcolumn)

    ## Quickstart

    <Message type="note">
    This API does not require authentication to be used.
    </Message>

    Run the request below to list all available Scaleway products:

      ```bash
      curl -X GET "https://api.scaleway.com/product-catalog/v2alpha1/public-catalog/products?page_size=5"
      ```

      You can add the following parameters to your endpoint:

      | Parameter        | Description                                   |
      | :--------------- | :--------------------------------------       |
      | `page`           | Number of the page. Value must be greater or equal to 1. |
      | `page_size`| The number of products per page. Value must be greater or equal to 1. |

      In the example above, we specify a `page_size` of 5 products per page.

    If the request was successful you will see a response like the following:

      ```json
      {
        "products": [
          {
            "sku": "/storage/local/ssd/storage",
            "service_category": "Compute",
            "product": "Compute Local Storage",
            "variant": "Compute - Local Storage",
            "description": "Compute - Local Storage (0.000044€ per GB)",
            "locality": {
              "global": true
            },
            "price": {
              "retail_price": {
                "currency_code": "EUR",
                "units": 0,
                "nanos": 44000
              },
              "unit_of_measure": {
                "unit": "gigabyte",
                "size": 1
              }
            }
          },
          {
            "sku": "/storage/snapshot/local_storage",
            "service_category": "Compute",
            "product": "Compute Snapshot Local Storage",
            "variant": "Block Storage - Local Snapshot",
            "description": "Block Storage - Local Snapshot (0.000044€ per GB)",
            "locality": {
              "global": true
            },
            "price": {
              "retail_price": {
                "currency_code": "EUR",
                "units": 0,
                "nanos": 44000
              },
              "unit_of_measure": {
                "unit": "gigabyte",
                "size": 1
              }
            }
          },
          {
            "sku": "/storage/local/scratch/storage/fr-par-1",
            "service_category": "Compute",
            "product": "Scratch Storage",
            "variant": "Compute - Scratch Storage - fr-par-1",
            "description": "Compute - Scratch Storage - fr-par-1 (0€)",
            "locality": {
              "zone": "fr-par-1"
            },
            "price": {
              "retail_price": {
                "currency_code": "EUR",
                "units": 0,
                "nanos": 0
              },
              "unit_of_measure": null
            }
          },
          {
            "sku": "/storage/local/scratch/storage/fr-par-2",
            "service_category": "Compute",
            "product": "Scratch Storage",
            "variant": "Compute - Scratch Storage - fr-par-2",
            "description": "Compute - Scratch Storage - fr-par-2 (0€)",
            "locality": {
              "zone": "fr-par-2"
            },
            "price": {
              "retail_price": {
                "currency_code": "EUR",
                "units": 0,
                "nanos": 0
              },
              "unit_of_measure": null
            }
          },
          {
            "sku": "/storage/local/scratch/storage/fr-par-3",
            "service_category": "Compute",
            "product": "Scratch Storage",
            "variant": "Compute - Scratch Storage - fr-par-3",
            "description": "Compute - Scratch Storage - fr-par-3 (0€)",
            "locality": {
              "zone": "fr-par-3"
            },
            "price": {
              "retail_price": {
                "currency_code": "EUR",
                "units": 0,
                "nanos": 0
              },
              "unit_of_measure": null
            }
          }
        ],
        "total_count": 3787
      }
      ```

    The response show you the total number of products in the catalog, and provides you with the following information about each product:

    <Message type="note">
      The information displayed in the response varies according to the product. Not all elements listed below apply to every product.
    </Message>

    - **Basic information** - product name, description, category
    - **Locality** - availability per region or zone, or global
    - **Price** - retail price of each product
    - **Additional information** - hardware specifications, ranges

    <Message type="tip">
      Refer to the response description of the [List all available products](#path-product-catalog-list-all-available-scaleway-products) method to find an extensive list of all possible response attributes.
    </Message>

    (switchcolumn)
    <Message type="requirement">
      To perform the following steps, you must first ensure that:<br /><br />
        - you have [installed `curl`](https://curl.se/download.html)
    </Message>
    (switchcolumn).
  version: v2alpha1
servers:
- url: https://api.scaleway.com
tags:
- name: Product catalog
  description: 'Scaleway''s Product Catalog is an extensive list of the Scaleway products.
    The catalog includes details about each product including: description, locations,
    prices and properties.'
components:
  schemas:
    scaleway.product_catalog.v2alpha1.ListPublicCatalogProductsResponse:
      type: object
      properties:
        products:
          type: array
          description: The list of products.
          items:
            $ref: '#/components/schemas/scaleway.product_catalog.v2alpha1.PublicCatalogProduct'
        total_count:
          type: integer
          description: The total number of products in the catalog.
          format: uint64
      x-properties-order:
      - products
      - total_count
    scaleway.product_catalog.v2alpha1.PublicCatalogProduct:
      type: object
      properties:
        sku:
          type: string
          description: The unique identifier of the product.
        service_category:
          type: string
          description: The category of the product.
        product:
          type: string
          description: The product name.
        variant:
          type: string
          description: The product variant.
        description:
          type: string
          description: The product description.
        locality:
          type: object
          description: The locality of the product.
          properties:
            global:
              type: boolean
              description: Whether or not the product is global.
              nullable: true
              x-one-of: locality
            region:
              type: string
              description: The region of the product.
              nullable: true
              x-one-of: locality
            zone:
              type: string
              description: The zone of the product.
              nullable: true
              x-one-of: locality
            datacenter:
              type: string
              description: The datacenter of the product.
              nullable: true
              x-one-of: locality
          x-properties-order:
          - global
          - region
          - zone
          - datacenter
        price:
          type: object
          description: The price of the product.
          properties:
            retail_price:
              type: object
              description: The retail price of the product.
              properties:
                currency_code:
                  type: string
                units:
                  type: integer
                  format: int64
                nanos:
                  type: integer
                  format: int32
              x-properties-order:
              - currency_code
              - units
              - nanos
            unit_of_measure:
              type: object
              description: The unit of measure of the price (deprecated).
              deprecated: true
              properties:
                unit:
                  type: string
                  description: The unit of measure.
                  enum:
                  - unknown_countable_unit
                  - chunk
                  - core
                  - currency
                  - device
                  - domain
                  - email
                  - gb_s
                  - gigabyte
                  - hour
                  - iops_gigabyte
                  - ip
                  - month
                  - node
                  - plan
                  - query
                  - request
                  - session
                  - vcpu_s
                  - version
                  - year
                  - key
                  - token
                  - minute
                  - setup
                  - day
                  x-enum-descriptions:
                    values:
                      unknown_countable_unit: Unknown countable unit.
                      chunk: Chunk.
                      core: Core.
                      currency: Currency.
                      device: Device.
                      domain: Domain.
                      email: Email.
                      gb_s: GB/s.
                      gigabyte: Gigabyte.
                      hour: Hour.
                      iops_gigabyte: IOPS gigabyte.
                      ip: IP.
                      month: Month.
                      node: Node.
                      plan: Plan.
                      query: Query.
                      request: Request.
                      session: Session.
                      vcpu_s: VCPU/s.
                      version: Version.
                      year: Year.
                      key: Key.
                      token: Token.
                      minute: Minute.
                      setup: The installation of a resource (software or hardware).
                      day: Day.
                  default: unknown_countable_unit
                size:
                  type: integer
                  description: The size of the unit.
                  format: uint64
              x-properties-order:
              - unit
              - size
          x-properties-order:
          - retail_price
          - unit_of_measure
        properties:
          type: object
          description: The properties of the product.
          properties:
            hardware:
              type: object
              description: The hardware properties of the product (if supported).
              properties:
                cpu:
                  type: object
                  description: The CPU hardware properties.
                  properties:
                    description:
                      type: string
                      description: A human readable description of the CPU.
                    arch:
                      type: string
                      description: The architecture of the CPU.
                      enum:
                      - unknown_arch
                      - x64
                      - arm64
                      - riscv
                      - apple_silicon
                      x-enum-descriptions:
                        values:
                          unknown_arch: Unknown architecture.
                          x64: X64.
                          arm64: ARM64.
                          riscv: RISC-V.
                          apple_silicon: Apple Silicon.
                      default: unknown_arch
                    type:
                      type: string
                      description: The type of the CPU.
                    virtual:
                      type: object
                      description: Properties if the CPU is virtual.
                      properties:
                        count:
                          type: integer
                          description: The number of vCPUs.
                          format: uint32
                      nullable: true
                      x-properties-order:
                      - count
                      x-one-of: compute_unit
                    physical:
                      type: object
                      description: Properties if the CPU is physical.
                      properties:
                        sockets:
                          type: integer
                          description: The number of sockets of the CPU.
                          format: uint32
                        cores_per_socket:
                          type: integer
                          description: The number of cores per socket.
                          format: uint32
                        threads_per_core:
                          type: integer
                          description: The number of threads per core.
                          format: uint32
                        frequency:
                          type: integer
                          description: The frequency of the CPU in Hertz.
                          format: uint64
                        benchmark:
                          type: integer
                          description: The benchmark score of the CPU.
                          format: uint32
                      nullable: true
                      x-properties-order:
                      - sockets
                      - cores_per_socket
                      - threads_per_core
                      - frequency
                      - benchmark
                      x-one-of: compute_unit
                    threads:
                      type: integer
                      description: The total number of threads.
                      format: uint32
                  x-properties-order:
                  - description
                  - arch
                  - type
                  - virtual
                  - physical
                  - threads
                ram:
                  type: object
                  description: The RAM hardware properties.
                  properties:
                    description:
                      type: string
                      description: A human-readable description of the RAM.
                    size:
                      type: integer
                      description: The size of the RAM in bytes. (in bytes)
                      format: uint64
                    type:
                      type: string
                      description: The type of the RAM.
                  x-properties-order:
                  - description
                  - size
                  - type
                storage:
                  type: object
                  description: The storage hardware properties.
                  properties:
                    description:
                      type: string
                      description: A human-readable description of the storage.
                    total:
                      type: integer
                      description: The total size of the storage in bytes. (in bytes)
                      format: uint64
                  x-properties-order:
                  - description
                  - total
                network:
                  type: object
                  description: The network hardware properties.
                  properties:
                    description:
                      type: string
                      description: A human-readable description of the network.
                    internal_bandwidth:
                      type: integer
                      description: The internal bandwidth in bits per second.
                      format: uint64
                    public_bandwidth:
                      type: integer
                      description: The default public bandwidth in bits per second.
                      format: uint64
                    max_public_bandwidth:
                      type: integer
                      description: The maximum public bandwidth in bits per second
                        (may require subscription to options).
                      format: uint64
                  x-properties-order:
                  - description
                  - internal_bandwidth
                  - public_bandwidth
                  - max_public_bandwidth
                gpu:
                  type: object
                  description: The GPU hardware properties.
                  properties:
                    description:
                      type: string
                      description: A human-readable description of the GPU.
                    count:
                      type: integer
                      description: The number of GPUs.
                      format: uint32
                    type:
                      type: string
                      description: The type of the GPU.
                  x-properties-order:
                  - description
                  - count
                  - type
              x-properties-order:
              - cpu
              - ram
              - storage
              - network
              - gpu
            dedibox:
              type: object
              description: The properties of Dedibox products.
              properties:
                range:
                  type: string
                  description: The range of the Dedibox server.
              nullable: true
              x-properties-order:
              - range
              x-one-of: properties
            elastic_metal:
              type: object
              description: The properties of Elastic Metal products.
              properties:
                range:
                  type: string
                  description: The range of the Elastic Metal server.
              nullable: true
              x-properties-order:
              - range
              x-one-of: properties
            apple_silicon:
              type: object
              description: The properties of Apple Silicon products.
              properties:
                range:
                  type: string
                  description: The range of the Apple Silicon server.
              nullable: true
              x-properties-order:
              - range
              x-one-of: properties
            instance:
              type: object
              description: The properties of Instance products.
              properties:
                range:
                  type: string
                  description: The range of the Instance server.
              nullable: true
              x-properties-order:
              - range
              x-one-of: properties
          x-properties-order:
          - hardware
          - dedibox
          - elastic_metal
          - apple_silicon
          - instance
        environmental_impact_estimation:
          type: object
          description: The environmental impact estimation of the product.
          properties:
            kg_co2_equivalent:
              type: number
              format: float
            m3_water_usage:
              type: number
              format: float
          x-properties-order:
          - kg_co2_equivalent
          - m3_water_usage
        unit_of_measure:
          type: object
          description: The unit of measure of the product.
          properties:
            unit:
              $ref: '#/components/schemas/scaleway.product_catalog.v2alpha1.PublicCatalogProduct.UnitOfMeasure.CountableUnit'
            size:
              type: integer
              format: uint64
          x-properties-order:
          - unit
          - size
      x-properties-order:
      - sku
      - service_category
      - product
      - variant
      - description
      - locality
      - price
      - properties
      - environmental_impact_estimation
      - unit_of_measure
    scaleway.product_catalog.v2alpha1.PublicCatalogProduct.UnitOfMeasure.CountableUnit:
      type: string
      enum:
      - unknown_countable_unit
      - chunk
      - core
      - currency
      - device
      - domain
      - email
      - gb_s
      - gigabyte
      - hour
      - iops_gigabyte
      - ip
      - month
      - node
      - plan
      - query
      - request
      - session
      - vcpu_s
      - version
      - year
      - key
      - token
      - minute
      - setup
      - day
      x-enum-descriptions:
        values:
          unknown_countable_unit: Unknown countable unit.
          chunk: Chunk.
          core: Core.
          currency: Currency.
          device: Device.
          domain: Domain.
          email: Email.
          gb_s: GB/s.
          gigabyte: Gigabyte.
          hour: Hour.
          iops_gigabyte: IOPS gigabyte.
          ip: IP.
          month: Month.
          node: Node.
          plan: Plan.
          query: Query.
          request: Request.
          session: Session.
          vcpu_s: VCPU/s.
          version: Version.
          year: Year.
          key: Key.
          token: Token.
          minute: Minute.
          setup: The installation of a resource (software or hardware).
          day: Day.
      default: unknown_countable_unit
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /product-catalog/v2alpha1/public-catalog/products:
    get:
      tags:
      - Product catalog
      operationId: ListPublicCatalogProducts
      summary: List all available products
      description: List all available products in the Scaleway catalog. Returns a
        complete list of products with their corresponding description, locations,
        prices and properties. You can define the `page` number and `page_size` for
        your query in the request.
      parameters:
      - in: query
        name: page
        description: Number of the page. Value must be greater or equal to 1.
        schema:
          type: integer
          description: Number of the page. Value must be greater or equal to 1.
          format: int32
      - in: query
        name: page_size
        description: The number of products per page. Value must be greater or equal
          to 1.
        schema:
          type: integer
          description: The number of products per page. Value must be greater or equal
            to 1.
          format: uint32
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.product_catalog.v2alpha1.ListPublicCatalogProductsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/product-catalog/v2alpha1/public-catalog/products"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/product-catalog/v2alpha1/public-catalog/products" \
            X-Auth-Token:$SCW_SECRET_KEY
