openapi: 3.0.0
info:
  title: IoT Hub API
  description: "Scaleway IoT Hub is a resilient message broker which supports multiple
    communication protocols and displays export capabilities. It is a PaaS (Platform-as-a-Service)
    enabling device-to-device and device-to-Scaleway communication.\n\nWhen connecting
    to a Hub, devices can exchange messages, granting them access to various cloud
    services. Hub routes also allow devices to send messages to other services that
    do not use MQTT (Message Queuing Telemetry Transport). MQTT is the most commonly
    used messaging protocol in IoT applications for its lightweight property and Publish/Subscribe
    model. Allowing interaction with services that do not use MQTT is an essential
    feature that increases flexibility and interoperability of the system.\n\nScaleway
    IoT Hub is thus versatile and can easily adapt to the various use cases, requirements,
    and constraints of a given IoT project. IoT Hub features include :\n\n- Pub/Sub
    architecture\n- MQTT protocol, with or without TLS, with or without WebSockets\n-
    Mutual authentication available on TLS connections\n- High Availability and Scalability\n-
    Routes to Scaleway's ecosystem for data ingestion\n- Multiple other IoT Networks
    such as SigFox or LoRa\n- Usage metrics\n\n## Concepts\n\nRefer to our [dedicated
    concepts page](https://www.scaleway.com/en/docs/managed-services/iot-hub/concepts/)
    to find definitions of the different terms referring to IoT Hub.\n\n## Quickstart\n\n(switchcolumn)\n(switchcolumn)\n\n###
    Set up your IoT Hub\n\n1. Configure your environment variables.\n    <Message
    type=\"note\">\n      This is an optional step that seeks to simplify your usage
    of the APIs. Since there is only one Availability Zone for IoT Hub, we have already
    set the value to the `fr-par` region for you.\n    </Message>\n\n    ```bash\n
    \   export IOT_API=\"https://api.scaleway.com/iot/v1/regions/fr-par\"\n    export
    SCW_ACCESS_KEY=\"<API access key>\"\n    export SCW_SECRET_KEY=\"<API secret key>\"\n
    \   ```\n\n2. Edit the POST request payload that we will use in the next step
    to create an IoT Hub.\n    ```\n    {\n      \"name\": \"my_first_hub\",\n      \"product_plan\":
    \"plan_dedicated\",\n    }\n    ```\n\n    | Parameter      | Description                                                                                                  |\n
    \   | :------------- | :-----------------------------------------------------------------------------------------------------------
    |\n    | `project_id`   | ID of the Project to create your flexible IP in.                                                             |\n
    \   | `name`         | Name of the Hub.                                                                                             |\n
    \   | `product_plan` | Product plan for your IoT Hub. Three product plans are
    currently available for Hubs: `plan_shared`, `plan_dedicated` and `plan_ha`. To
    find which plan is better suited to your needs, you can consult the [IoT Hub Quickstart
    page](https://www.scaleway.com/en/docs/managed-services/iot-hub/quickstart/#how-to-create-an-iot-hub).
    \                              |\n\n3. Create a Hub. Run the following command
    to create the Hub. Make sure you include the payload you edited in the previous
    step.\n    <Message type=\"note\">\n      We will save the output in a file called
    `myhub.json`.\n    </Message>\n\n    ```bash\n    curl -X POST \\\n      -H \"X-Auth-Token:
    $SCW_SECRET_KEY\" \\\n      -H \"Content-Type: application/json\" \\\n      -d
    '{\n        \"project_id\": \"7281793f-8474-727d-7688-72893f747g7e\",\n        \"name\":
    \"my_first_hub\",\n        \"product_plan\": \"plan_dedicated\"}' \\\n    \"$IOT_API/hubs\"
    > myhub.json\n    ```\n\n4. Get your Hub's information. Run the following command
    to pull your Hub's information from the `myhub.json` file.\n    ```bash\n    curl
    -X GET \\\n      -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n      \"$IOT_API/hubs/$(jq
    -r '.id' myhub.json)\"\n    ```\n\n    You should get an output similar to the
    following. The status should be indicated as `ready`.\n    <Message type=\"note\">\n
    \     This is a response example, the UUIDs displayed are not real.\n    </Message>\n\n
    \   ```bash\n    {\n      \"region\":\"fr-par\", \n      \"id\":\"6e38b739-2872-52fg-9gb7-e8gf8185be69\",
    \n      \"organization_id\":\"7281793f-8474-727d-7688-72893f747g7e\", \n      \"project_id\":\"7281793f-8474-727d-7688-72893f747g7e\",
    \n      \"name\":\"my_first_hub\", \n      \"status\":\"ready\", \n      \"product_plan\":\"plan_dedicated\",
    \n      \"endpoint\":\"iot.fr-par.scw.cloud\", \n      \"created_at\":\"2023-04-06T09:37:31.162Z\",
    \n      \"updated_at\":\"2023-04-06T09:37:31.162Z\", \n      \"enabled\": true,
    \ \n      \"device_count\":0, \n      \"connected_device_count\":0, \n      \"disable_events\":
    false, \n      \"events_topic_prefix\":\"$SCW/events\", \n      \"enable_device_auto_provisioning\":
    false, \n      \"has_custom_ca\": false\n      }\n      ```\n\n### Set up your
    IoT device\n\n1. Edit the following POST request payload to create your first
    device.\n    <Message type=\"note\">\n      For the sake of simplicity, the following
    payload allows the device to connect using insecure protocols (such as plain text
    MQTT or MQTTs without mutual authentication). In production, you should always
    deny insecure connections to ensure the highest level of security. This would
    be done by setting the field `allow_insecure` to `false`.\n    </Message>\n\n
    \   ```\n    {\n      \"name\": \"my-first-device\",\n      \"description\": \"This
    is a description for my first device that will act as subscriber\"\n      \"allow_insecure\":
    \"true\",\n    }\n    ```\n    | Parameters       | Description                                                                |\n
    \   | :--------------- | :-------------------------------------------------------------------------
    |\n    | `name`           | Device name                                                                |\n
    \   | `description`    | A description of your device.                                              |\n
    \   | `allow_insecure` | Whether or not you allow insecure connections. Values
    are either `true` or `false`.                                                                                        |\n\n2.
    **Create your first device**. Run the following command to create your first device.
    \n    <Message type=\"note\">\n      The response output will be saved in a file
    called `mydev1.json` and then piped to `jq < mydev1.json` to pretty-print the
    output in your terminal.\n    </Message>\n\n    ```bash\n    curl -X POST \\\n
    \     -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n      -H \"Content-Type: application/json\"
    \\\n      -d '{\n        \"hub_id\": \"'$(jq -r '.id' myhub.json)'\",\n        \"name\":
    \"my_first_device\",\n        \"description\": \"This is a description for my
    first device that will act as subscriber\",\n        \"allow_insecure\": true\n
    \       }' \\\n    \"$IOT_API/devices\" > mydev1.json\n    jq < mydev1.json\n
    \   ```\n\n    You should get an output similar to the following, providing information
    about your device.\n    <Message type=\"note\">\n      This is a response example,
    the UUIDs displayed are not real.\n    </Message>\n\n    ```bash\n    {\n      \"device\":
    {\n        \"id\": \"98896561-9547-46a7-aa5b-8117a71a4b3c\",\n        \"name\":
    \"my_first_device\",\n        \"status\": \"enabled\",\n        \"hub_id\": \"6e38b739-2872-52fg-9gb7-e8gf8185be69\",\n
    \       \"created_at\": \"2023-04-06T11:01:31.698Z\",\n        \"updated_at\":
    \"2023-04-06T11:01:31.698Z\",\n        \"allow_insecure\": true,\n        \"last_activity_at\":
    \"1970-01-01T00:00:00Z\",\n        \"is_connected\": false,\n        \"message_filters\":
    {\n          \"publish\": {\n            \"policy\": \"reject\",\n            \"topics\":
    []\n          },\n          \"subscribe\": {\n            \"policy\": \"reject\",\n
    \           \"topics\": []\n          }\n        },\n        \"allow_multiple_connections\":
    false,\n        \"description\": \"This is a description for my first device that
    will act as subscriber\",\n        \"has_custom_certificate\": false\n      },\n
    \     \"certificate\": {\n        \"crt\": \"<certificate here>\",\n        \"key\":
    \"<certificate key here>\"\n      }\n    }\n    ```\n\n3. Create your second device.
    Run the following command to create your second device.\n    ```bash\n    curl
    -X POST \\\n      -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n      -H \"Content-Type:
    application/json\" \\\n      -d '{\n        \"hub_id\": \"'$(jq -r '.id' myhub.json)'\",\n
    \       \"name\": \"my_second_device\",\n        \"description\": \"This is a
    description for my second device that will act as publisher\",\n        \"allow_insecure\":
    true\n        }' \\\n    \"$IOT_API/devices\" > mydev2.json\n    jq < mydev2.json\n
    \   ```\n\n### Subscribe and publish\n\nIn the next part, you will simulate two
    devices to indicate how to set them up as publishers and subscribers.\n\n1. Set
    up the subscriber. Open a new terminal window and run the following command to
    subscribe to an MQTT topic.\n    ```bash\n    mosquitto_sub \\\n      -h $(jq
    -r '.endpoint' myhub.json) \\\n      -i $(jq -r '.device.id' mydev1.json) \\\n
    \     -t mytopic/mysubtopic\n    ```\n\n2. Set up the publisher. Open another
    terminal window and run the following command to publish a `Hello, world!` message
    to an MQTT topic.\n    ```bash\n    mosquitto_pub \\\n      -h $(jq -r '.endpoint'
    myhub.json) \\\n      -i $(jq -r '.device.id' mydev2.json) \\\n      -t mytopic/mysubtopic
    \\\n      -m 'Hello, world!'\n    ```\n\n    When you open the terminal window
    you used to set up the subscriber, you should see that the `Hello, world!` message
    has successfuly been received.\n\n(switchcolumn)\n<Message type=\"requirement\">\nTo
    perform the following steps, you must first ensure that:\n- You have a [Scaleway
    account](https://console.scaleway.com/)\n- You have [created an API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/)
    and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/identity-and-access-management/iam/reference-content/permission-sets/)
    to perform the actions described on this page\n- You have [installed `curl`](https://curl.se/download.html)\n-
    You have [installed `mosquitto`](https://mosquitto.org/download/)\n- You have
    [installed `jq`](https://stedolan.github.io/jq/download/)\n</Message>\n(switchcolumn)\n\n##
    Technical information\n\n### Availability Zones\n\nHubs can be created in the
    following Availability Zone:\n\n- Paris `fr-par`\n\n## Going further\n\nFor more
    help using Scaleway IoT Hub, check out the following resources:\n- Our [main documentation](https://www.scaleway.com/en/docs/managed-services/iot-hub/)\n-
    The #iot-hub channel on our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)\n-
    Our [support ticketing system](https://www.scaleway.com/en/docs/console/my-account/how-to/open-a-support-ticket/)."
  version: v1
servers:
- url: https://api.scaleway.com
tags:
- name: IoT Hubs
  description: Send and receive messages from connected IoT devices through managed
    message brokers
- name: IoT Devices
  description: Control which specific IoT devices are allowed to connect to a Hub
- name: IoT Routes
  description: Set up managed routes to control how IoT device messages are sent and
    received within a Hub
- name: IoT Networks
  description: Connect a Hub to external networks and services using links to external
    IoT networks
- name: IoT Cloud Twins
  description: Create cloud twins as virtual representations of IoT devices in the
    cloud to manage, monitor, and control them remotely
components:
  schemas:
    google.protobuf.StringValue:
      type: string
      nullable: true
    google.protobuf.UInt32Value:
      type: integer
      format: uint32
      nullable: true
    scaleway.iot.v1.CreateDeviceResponse:
      type: object
      properties:
        device:
          type: object
          description: Information related to the created device.
          properties:
            id:
              type: string
              description: Device ID, also used as MQTT Client ID or username.
            name:
              type: string
              description: Device name.
            description:
              type: string
              description: Device description.
            status:
              type: string
              description: Device status.
              enum:
              - unknown
              - error
              - enabled
              - disabled
              default: unknown
            hub_id:
              type: string
              description: Hub ID.
            last_activity_at:
              type: string
              description: Last connection/activity date of a device. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            is_connected:
              type: boolean
              description: Defines whether the device is connected to the Hub.
            allow_insecure:
              type: boolean
              description: Defines whether to allow the device to connect to the Hub
                without TLS mutual authentication.
            allow_multiple_connections:
              type: boolean
              description: Defines whether to allow multiple physical devices to connect
                to the Hub with this device's credentials.
            message_filters:
              type: object
              description: Filter-sets to restrict the topics the device can publish/subscribe
                to.
              properties:
                publish:
                  type: object
                  description: Filtering rule to restrict topics the device can publish
                    to.
                  properties:
                    policy:
                      type: string
                      description: |-
                        How to use the topic list.
                        If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                        If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                      enum:
                      - unknown
                      - accept
                      - reject
                      default: unknown
                    topics:
                      type: array
                      description: List of topics to accept or reject. It must be
                        valid MQTT topics and up to 65535 characters.
                      nullable: true
                      items:
                        type: string
                  x-properties-order:
                  - policy
                  - topics
                subscribe:
                  type: object
                  description: Filtering rule to restrict topics the device can subscribe
                    to.
                  properties:
                    policy:
                      type: string
                      description: |-
                        How to use the topic list.
                        If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                        If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                      enum:
                      - unknown
                      - accept
                      - reject
                      default: unknown
                    topics:
                      type: array
                      description: List of topics to accept or reject. It must be
                        valid MQTT topics and up to 65535 characters.
                      nullable: true
                      items:
                        type: string
                  x-properties-order:
                  - policy
                  - topics
              x-properties-order:
              - publish
              - subscribe
            has_custom_certificate:
              type: boolean
              description: |-
                Defines whether the device was assigned a custom certificate.
                Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate.
            created_at:
              type: string
              description: Date at which the device was added. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date at which the device was last modified. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - name
          - description
          - status
          - hub_id
          - last_activity_at
          - is_connected
          - allow_insecure
          - allow_multiple_connections
          - message_filters
          - has_custom_certificate
          - created_at
          - updated_at
        certificate:
          type: object
          description: Device certificate.
          properties:
            crt:
              type: string
            key:
              type: string
          x-properties-order:
          - crt
          - key
      x-properties-order:
      - device
      - certificate
    scaleway.iot.v1.CreateNetworkResponse:
      type: object
      properties:
        network:
          type: object
          description: Information related to the created network.
          properties:
            id:
              type: string
              description: Network ID.
            name:
              type: string
              description: Network name.
            type:
              type: string
              description: Type of network to connect with.
              enum:
              - unknown
              - sigfox
              - rest
              default: unknown
            endpoint:
              type: string
              description: Endpoint to use for interacting with the network.
            hub_id:
              type: string
              description: Hub ID to connect the Network to.
            created_at:
              type: string
              description: Date at which the network was created. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            topic_prefix:
              type: string
              description: |-
                Topic prefix for the Network.
                This prefix will be prepended to all topics for this Network.
          x-properties-order:
          - id
          - name
          - type
          - endpoint
          - hub_id
          - created_at
          - topic_prefix
        secret:
          type: string
          description: Endpoint Key to keep secret. This cannot be retrieved later.
      x-properties-order:
      - network
      - secret
    scaleway.iot.v1.Device:
      type: object
      properties:
        id:
          type: string
          description: Device ID, also used as MQTT Client ID or username.
        name:
          type: string
          description: Device name.
        description:
          type: string
          description: Device description.
        status:
          type: string
          description: Device status.
          enum:
          - unknown
          - error
          - enabled
          - disabled
          default: unknown
        hub_id:
          type: string
          description: Hub ID.
        last_activity_at:
          type: string
          description: Last connection/activity date of a device. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        is_connected:
          type: boolean
          description: Defines whether the device is connected to the Hub.
        allow_insecure:
          type: boolean
          description: Defines whether to allow the device to connect to the Hub without
            TLS mutual authentication.
        allow_multiple_connections:
          type: boolean
          description: Defines whether to allow multiple physical devices to connect
            to the Hub with this device's credentials.
        message_filters:
          type: object
          description: Filter-sets to restrict the topics the device can publish/subscribe
            to.
          properties:
            publish:
              type: object
              description: Filtering rule to restrict topics the device can publish
                to.
              properties:
                policy:
                  type: string
                  description: |-
                    How to use the topic list.
                    If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                    If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                  enum:
                  - unknown
                  - accept
                  - reject
                  default: unknown
                topics:
                  type: array
                  description: List of topics to accept or reject. It must be valid
                    MQTT topics and up to 65535 characters.
                  nullable: true
                  items:
                    type: string
              x-properties-order:
              - policy
              - topics
            subscribe:
              type: object
              description: Filtering rule to restrict topics the device can subscribe
                to.
              properties:
                policy:
                  type: string
                  description: |-
                    How to use the topic list.
                    If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                    If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                  enum:
                  - unknown
                  - accept
                  - reject
                  default: unknown
                topics:
                  type: array
                  description: List of topics to accept or reject. It must be valid
                    MQTT topics and up to 65535 characters.
                  nullable: true
                  items:
                    type: string
              x-properties-order:
              - policy
              - topics
          x-properties-order:
          - publish
          - subscribe
        has_custom_certificate:
          type: boolean
          description: |-
            Defines whether the device was assigned a custom certificate.
            Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate.
        created_at:
          type: string
          description: Date at which the device was added. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Date at which the device was last modified. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
      x-properties-order:
      - id
      - name
      - description
      - status
      - hub_id
      - last_activity_at
      - is_connected
      - allow_insecure
      - allow_multiple_connections
      - message_filters
      - has_custom_certificate
      - created_at
      - updated_at
    scaleway.iot.v1.GetDeviceCertificateResponse:
      type: object
      properties:
        device:
          type: object
          description: Information related to the created device.
          properties:
            id:
              type: string
              description: Device ID, also used as MQTT Client ID or username.
            name:
              type: string
              description: Device name.
            description:
              type: string
              description: Device description.
            status:
              type: string
              description: Device status.
              enum:
              - unknown
              - error
              - enabled
              - disabled
              default: unknown
            hub_id:
              type: string
              description: Hub ID.
            last_activity_at:
              type: string
              description: Last connection/activity date of a device. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            is_connected:
              type: boolean
              description: Defines whether the device is connected to the Hub.
            allow_insecure:
              type: boolean
              description: Defines whether to allow the device to connect to the Hub
                without TLS mutual authentication.
            allow_multiple_connections:
              type: boolean
              description: Defines whether to allow multiple physical devices to connect
                to the Hub with this device's credentials.
            message_filters:
              type: object
              description: Filter-sets to restrict the topics the device can publish/subscribe
                to.
              properties:
                publish:
                  type: object
                  description: Filtering rule to restrict topics the device can publish
                    to.
                  properties:
                    policy:
                      type: string
                      description: |-
                        How to use the topic list.
                        If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                        If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                      enum:
                      - unknown
                      - accept
                      - reject
                      default: unknown
                    topics:
                      type: array
                      description: List of topics to accept or reject. It must be
                        valid MQTT topics and up to 65535 characters.
                      nullable: true
                      items:
                        type: string
                  x-properties-order:
                  - policy
                  - topics
                subscribe:
                  type: object
                  description: Filtering rule to restrict topics the device can subscribe
                    to.
                  properties:
                    policy:
                      type: string
                      description: |-
                        How to use the topic list.
                        If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                        If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                      enum:
                      - unknown
                      - accept
                      - reject
                      default: unknown
                    topics:
                      type: array
                      description: List of topics to accept or reject. It must be
                        valid MQTT topics and up to 65535 characters.
                      nullable: true
                      items:
                        type: string
                  x-properties-order:
                  - policy
                  - topics
              x-properties-order:
              - publish
              - subscribe
            has_custom_certificate:
              type: boolean
              description: |-
                Defines whether the device was assigned a custom certificate.
                Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate.
            created_at:
              type: string
              description: Date at which the device was added. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date at which the device was last modified. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - name
          - description
          - status
          - hub_id
          - last_activity_at
          - is_connected
          - allow_insecure
          - allow_multiple_connections
          - message_filters
          - has_custom_certificate
          - created_at
          - updated_at
        certificate_pem:
          type: string
          description: Device certificate.
      x-properties-order:
      - device
      - certificate_pem
    scaleway.iot.v1.GetDeviceMetricsResponse:
      type: object
      properties:
        metrics:
          type: array
          description: Metrics for a device over the requested period.
          items:
            $ref: '#/components/schemas/scaleway.std.TimeSeries'
      x-properties-order:
      - metrics
    scaleway.iot.v1.GetHubCAResponse:
      type: object
      properties:
        ca_cert_pem:
          type: string
      x-properties-order:
      - ca_cert_pem
    scaleway.iot.v1.GetHubMetricsResponse:
      type: object
      properties:
        metrics:
          type: array
          description: Metrics for a Hub over the requested period.
          items:
            $ref: '#/components/schemas/scaleway.std.TimeSeries'
      x-properties-order:
      - metrics
    scaleway.iot.v1.Hub:
      type: object
      properties:
        id:
          type: string
          description: Hub ID.
        name:
          type: string
          description: Hub name.
        status:
          type: string
          description: Current status of the Hub.
          enum:
          - unknown
          - error
          - enabling
          - ready
          - disabling
          - disabled
          default: unknown
        product_plan:
          type: string
          description: Hub feature set.
          enum:
          - plan_unknown
          - plan_shared
          - plan_dedicated
          - plan_ha
          default: plan_unknown
        enabled:
          type: boolean
          description: Defines whether the hub has been enabled.
        device_count:
          type: integer
          description: Number of registered devices.
          format: uint64
        connected_device_count:
          type: integer
          description: Number of currently connected devices.
          format: uint64
        endpoint:
          type: string
          description: |-
            Host to connect your devices to.
            Devices should be connected to this host. Port may be 1883 (MQTT), 8883 (MQTT over TLS), 80 (MQTT over Websocket) or 443 (MQTT over Websocket over TLS).
        disable_events:
          type: boolean
          description: Defines whether to disable Hub events.
        events_topic_prefix:
          type: string
          description: Hub events topic prefix.
        region:
          type: string
          description: Region of the Hub.
        created_at:
          type: string
          description: Hub creation date. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Hub last modification date. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        project_id:
          type: string
          description: Project owning the resource.
        organization_id:
          type: string
          description: Organization owning the resource.
        enable_device_auto_provisioning:
          type: boolean
          description: |-
            Defines whether to enable device auto provisioning.
            When an unknown device connects to your hub using a valid certificate chain, it will be automatically provisioned inside your Hub. The Hub uses the common name of the device certifcate to find out if a device with the same name already exists. This setting can only be enabled on a hub with a custom certificate authority.
        has_custom_ca:
          type: boolean
          description: |-
            Defines whether the hub is using a custom certificate authority.
            Flag is automatically set to `false` after Hub creation, as Hub certificates are managed by Scaleway. Once a custom certificate authority is set, the flag will be set to `true`.
        twins_graphite_config:
          type: object
          description: BETA - not implemented yet.
          properties:
            push_uri:
              type: string
          nullable: true
          x-properties-order:
          - push_uri
          x-one-of: twins_db_config
      x-properties-order:
      - id
      - name
      - status
      - product_plan
      - enabled
      - device_count
      - connected_device_count
      - endpoint
      - disable_events
      - events_topic_prefix
      - region
      - created_at
      - updated_at
      - project_id
      - organization_id
      - enable_device_auto_provisioning
      - has_custom_ca
      - twins_graphite_config
    scaleway.iot.v1.ListDevicesResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Total number of devices.
          format: uint32
        devices:
          type: array
          description: Page of devices.
          items:
            $ref: '#/components/schemas/scaleway.iot.v1.Device'
      x-properties-order:
      - total_count
      - devices
    scaleway.iot.v1.ListHubsResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Total number of Hubs.
          format: uint32
        hubs:
          type: array
          description: A page of hubs.
          items:
            $ref: '#/components/schemas/scaleway.iot.v1.Hub'
      x-properties-order:
      - total_count
      - hubs
    scaleway.iot.v1.ListNetworksResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Total number of Networks.
          format: uint32
        networks:
          type: array
          description: Page of networks.
          items:
            $ref: '#/components/schemas/scaleway.iot.v1.Network'
      x-properties-order:
      - total_count
      - networks
    scaleway.iot.v1.ListRoutesResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Total number of routes.
          format: uint32
        routes:
          type: array
          description: Page of routes.
          items:
            $ref: '#/components/schemas/scaleway.iot.v1.RouteSummary'
      x-properties-order:
      - total_count
      - routes
    scaleway.iot.v1.ListTwinDocumentsResponse:
      type: object
      properties:
        documents:
          type: array
          description: List of the twin document.
          items:
            $ref: '#/components/schemas/scaleway.iot.v1.ListTwinDocumentsResponse.DocumentSummary'
      x-properties-order:
      - documents
    scaleway.iot.v1.ListTwinDocumentsResponse.DocumentSummary:
      type: object
      properties:
        document_name:
          type: string
          description: Name of the document.
      x-properties-order:
      - document_name
    scaleway.iot.v1.Network:
      type: object
      properties:
        id:
          type: string
          description: Network ID.
        name:
          type: string
          description: Network name.
        type:
          type: string
          description: Type of network to connect with.
          enum:
          - unknown
          - sigfox
          - rest
          default: unknown
        endpoint:
          type: string
          description: Endpoint to use for interacting with the network.
        hub_id:
          type: string
          description: Hub ID to connect the Network to.
        created_at:
          type: string
          description: Date at which the network was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        topic_prefix:
          type: string
          description: |-
            Topic prefix for the Network.
            This prefix will be prepended to all topics for this Network.
      x-properties-order:
      - id
      - name
      - type
      - endpoint
      - hub_id
      - created_at
      - topic_prefix
    scaleway.iot.v1.RenewDeviceCertificateResponse:
      type: object
      properties:
        device:
          type: object
          description: Information related to the created device.
          properties:
            id:
              type: string
              description: Device ID, also used as MQTT Client ID or username.
            name:
              type: string
              description: Device name.
            description:
              type: string
              description: Device description.
            status:
              type: string
              description: Device status.
              enum:
              - unknown
              - error
              - enabled
              - disabled
              default: unknown
            hub_id:
              type: string
              description: Hub ID.
            last_activity_at:
              type: string
              description: Last connection/activity date of a device. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            is_connected:
              type: boolean
              description: Defines whether the device is connected to the Hub.
            allow_insecure:
              type: boolean
              description: Defines whether to allow the device to connect to the Hub
                without TLS mutual authentication.
            allow_multiple_connections:
              type: boolean
              description: Defines whether to allow multiple physical devices to connect
                to the Hub with this device's credentials.
            message_filters:
              type: object
              description: Filter-sets to restrict the topics the device can publish/subscribe
                to.
              properties:
                publish:
                  type: object
                  description: Filtering rule to restrict topics the device can publish
                    to.
                  properties:
                    policy:
                      type: string
                      description: |-
                        How to use the topic list.
                        If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                        If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                      enum:
                      - unknown
                      - accept
                      - reject
                      default: unknown
                    topics:
                      type: array
                      description: List of topics to accept or reject. It must be
                        valid MQTT topics and up to 65535 characters.
                      nullable: true
                      items:
                        type: string
                  x-properties-order:
                  - policy
                  - topics
                subscribe:
                  type: object
                  description: Filtering rule to restrict topics the device can subscribe
                    to.
                  properties:
                    policy:
                      type: string
                      description: |-
                        How to use the topic list.
                        If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                        If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                      enum:
                      - unknown
                      - accept
                      - reject
                      default: unknown
                    topics:
                      type: array
                      description: List of topics to accept or reject. It must be
                        valid MQTT topics and up to 65535 characters.
                      nullable: true
                      items:
                        type: string
                  x-properties-order:
                  - policy
                  - topics
              x-properties-order:
              - publish
              - subscribe
            has_custom_certificate:
              type: boolean
              description: |-
                Defines whether the device was assigned a custom certificate.
                Assigning a custom certificate allows a device to authenticate using that specific certificate without checking the Hub's CA certificate.
            created_at:
              type: string
              description: Date at which the device was added. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            updated_at:
              type: string
              description: Date at which the device was last modified. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
          x-properties-order:
          - id
          - name
          - description
          - status
          - hub_id
          - last_activity_at
          - is_connected
          - allow_insecure
          - allow_multiple_connections
          - message_filters
          - has_custom_certificate
          - created_at
          - updated_at
        certificate:
          type: object
          description: Device certificate.
          properties:
            crt:
              type: string
            key:
              type: string
          x-properties-order:
          - crt
          - key
      x-properties-order:
      - device
      - certificate
    scaleway.iot.v1.Route:
      type: object
      properties:
        id:
          type: string
          description: Route ID.
        name:
          type: string
          description: Route name.
        hub_id:
          type: string
          description: Hub ID of the route.
        topic:
          type: string
          description: Topic the route subscribes to. It must be a valid MQTT topic
            and up to 65535 characters.
        type:
          type: string
          description: Route type.
          enum:
          - unknown
          - s3
          - database
          - rest
          default: unknown
        created_at:
          type: string
          description: Date at which the route was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        s3_config:
          type: object
          description: When using Amazon S3 Routes, Amazon S3-specific configuration
            fields.
          properties:
            bucket_region:
              type: string
              description: Region of the Amazon S3 route's destination bucket (e.g.,
                'fr-par').
            bucket_name:
              type: string
              description: Destination bucket name of the Amazon S3 route.
            object_prefix:
              type: string
              description: Optional string to prefix object names with.
            strategy:
              type: string
              description: 'How the Amazon S3 route''s objects will be created: one
                per topic or one per message.'
              enum:
              - unknown
              - per_topic
              - per_message
              default: unknown
          nullable: true
          x-properties-order:
          - bucket_region
          - bucket_name
          - object_prefix
          - strategy
          x-one-of: Config
        db_config:
          type: object
          description: When using Database Route, DB-specific configuration fields.
          properties:
            engine:
              type: string
              description: Database engine the route will connect to. If not specified,
                the default database will be 'PostgreSQL'.
              enum:
              - unknown
              - postgresql
              - mysql
              default: unknown
            host:
              type: string
              description: Database host.
            port:
              type: integer
              description: Database port.
              format: uint32
            dbname:
              type: string
              description: Database name.
            username:
              type: string
              description: Database username. Make sure this account can execute the
                provided query.
            password:
              type: string
              description: Database password.
            query:
              type: string
              description: SQL query to be executed ($TOPIC and $PAYLOAD variables
                are available, see documentation).
          nullable: true
          required:
          - host
          - port
          - dbname
          - username
          - password
          x-properties-order:
          - engine
          - host
          - port
          - dbname
          - username
          - password
          - query
          x-one-of: Config
        rest_config:
          type: object
          description: When using Rest Route, Rest-specific configuration fields.
          properties:
            verb:
              type: string
              description: HTTP verb used to call REST URI.
              enum:
              - unknown
              - get
              - post
              - put
              - patch
              - delete
              default: unknown
            uri:
              type: string
              description: URI of the REST endpoint.
            headers:
              type: object
              description: HTTP call extra headers.
              properties:
                <headerKey>:
                  type: string
              additionalProperties: true
          nullable: true
          x-properties-order:
          - verb
          - uri
          - headers
          x-one-of: Config
        updated_at:
          type: string
          description: Date at which the route was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
      x-properties-order:
      - id
      - name
      - hub_id
      - topic
      - type
      - created_at
      - s3_config
      - db_config
      - rest_config
      - updated_at
    scaleway.iot.v1.Route.DatabaseConfig.Engine:
      type: string
      enum:
      - unknown
      - postgresql
      - mysql
      default: unknown
    scaleway.iot.v1.Route.RestConfig.HttpVerb:
      type: string
      enum:
      - unknown
      - get
      - post
      - put
      - patch
      - delete
      default: unknown
    scaleway.iot.v1.Route.S3Config.S3Strategy:
      type: string
      enum:
      - unknown
      - per_topic
      - per_message
      default: unknown
    scaleway.iot.v1.RouteSummary:
      type: object
      properties:
        id:
          type: string
          description: Route ID.
        name:
          type: string
          description: Route name.
        hub_id:
          type: string
          description: Hub ID of the route.
        topic:
          type: string
          description: Topic the route subscribes to. It must be a valid MQTT topic
            and up to 65535 characters.
        type:
          type: string
          description: Route type.
          enum:
          - unknown
          - s3
          - database
          - rest
          default: unknown
        created_at:
          type: string
          description: Date at which the route was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Date at which the route was last updated. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
      x-properties-order:
      - id
      - name
      - hub_id
      - topic
      - type
      - created_at
      - updated_at
    scaleway.iot.v1.SetDeviceCertificateResponse:
      type: object
      properties:
        device:
          $ref: '#/components/schemas/scaleway.iot.v1.Device'
        certificate_pem:
          type: string
      x-properties-order:
      - device
      - certificate_pem
    scaleway.iot.v1.TwinDocument:
      type: object
      properties:
        twin_id:
          type: string
          description: Parent twin ID of the document.
        document_name:
          type: string
          description: Name of the document.
        version:
          type: integer
          description: New version of the document.
          format: uint32
        data:
          type: object
          description: New data related to the document.
          properties:
            <fieldKey>:
              type: object
      x-properties-order:
      - twin_id
      - document_name
      - version
      - data
    scaleway.std.MapStringStringValue:
      type: object
      properties:
        <key>:
          type: string
      nullable: true
    scaleway.std.TimeSeries:
      type: object
      properties:
        name:
          type: string
        points:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.std.TimeSeries.Point'
        metadata:
          type: object
          properties:
            <metadataKey>:
              type: string
          additionalProperties: true
      x-properties-order:
      - name
      - points
      - metadata
    scaleway.std.TimeSeries.Point:
      type: array
      items:
        oneOf:
        - type: string
          format: date-time
        - type: number
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /iot/v1/regions/{region}/devices:
    get:
      tags:
      - IoT Devices
      operationId: ListDevices
      summary: List devices
      description: List all devices in the specified region. By default, returned
        devices are ordered by creation date in ascending order, though this can be
        modified via the `order_by` field.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          description: Page number to return, from the paginated results.
          format: int32
      - in: query
        name: page_size
        description: Number of devices to return within a page. Maximum value is 100.
        schema:
          type: integer
          description: Number of devices to return within a page. Maximum value is
            100.
          format: uint32
      - in: query
        name: order_by
        description: Ordering of requested devices.
        schema:
          type: string
          description: Ordering of requested devices.
          enum:
          - name_asc
          - name_desc
          - status_asc
          - status_desc
          - hub_id_asc
          - hub_id_desc
          - created_at_asc
          - created_at_desc
          - updated_at_asc
          - updated_at_desc
          - allow_insecure_asc
          - allow_insecure_desc
          default: name_asc
      - in: query
        name: name
        description: Name to filter for, only devices with this name will be returned.
        schema:
          type: string
          description: Name to filter for, only devices with this name will be returned.
      - in: query
        name: hub_id
        description: Hub ID to filter for, only devices attached to this Hub will
          be returned.
        schema:
          type: string
          description: Hub ID to filter for, only devices attached to this Hub will
            be returned.
      - in: query
        name: allow_insecure
        description: Defines whether to filter the allow_insecure flag.
        schema:
          type: boolean
          description: Defines whether to filter the allow_insecure flag.
      - in: query
        name: status
        description: Device status (enabled, disabled, etc.).
        schema:
          type: string
          description: Device status (enabled, disabled, etc.).
          enum:
          - unknown
          - error
          - enabled
          - disabled
          default: unknown
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.ListDevicesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/devices"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/devices" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - IoT Devices
      operationId: CreateDevice
      summary: Add a device
      description: Attach a device to a given Hub.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.CreateDeviceResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Device name.
                hub_id:
                  type: string
                  description: Hub ID of the device.
                allow_insecure:
                  type: boolean
                  description: Defines whether to allow plain and server-authenticated
                    SSL connections in addition to mutually-authenticated ones.
                allow_multiple_connections:
                  type: boolean
                  description: Defines whether to allow multiple physical devices
                    to connect with this device's credentials.
                message_filters:
                  type: object
                  description: Filter-sets to authorize or deny the device to publish/subscribe
                    to specific topics.
                  properties:
                    publish:
                      type: object
                      description: Filtering rule to restrict topics the device can
                        publish to.
                      properties:
                        policy:
                          type: string
                          description: |-
                            How to use the topic list.
                            If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                            If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                          enum:
                          - unknown
                          - accept
                          - reject
                          default: unknown
                        topics:
                          type: array
                          description: List of topics to accept or reject. It must
                            be valid MQTT topics and up to 65535 characters.
                          nullable: true
                          items:
                            type: string
                      x-properties-order:
                      - policy
                      - topics
                    subscribe:
                      type: object
                      description: Filtering rule to restrict topics the device can
                        subscribe to.
                      properties:
                        policy:
                          type: string
                          description: |-
                            How to use the topic list.
                            If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                            If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                          enum:
                          - unknown
                          - accept
                          - reject
                          default: unknown
                        topics:
                          type: array
                          description: List of topics to accept or reject. It must
                            be valid MQTT topics and up to 65535 characters.
                          nullable: true
                          items:
                            type: string
                      x-properties-order:
                      - policy
                      - topics
                  x-properties-order:
                  - publish
                  - subscribe
                description:
                  type: string
                  description: Device description.
                  nullable: true
              required:
              - name
              - hub_id
              x-properties-order:
              - name
              - hub_id
              - allow_insecure
              - allow_multiple_connections
              - message_filters
              - description
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "allow_insecure": false,
              "allow_multiple_connections": false,
              "hub_id": "string",
              "name": "string"
            }' \
            "https://api.scaleway.com/iot/v1/regions/fr-par/devices"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/iot/v1/regions/fr-par/devices" \
            X-Auth-Token:$SCW_SECRET_KEY \
            allow_insecure:=false \
            allow_multiple_connections:=false \
            hub_id="string" \
            name="string"
  /iot/v1/regions/{region}/devices/{device_id}:
    get:
      tags:
      - IoT Devices
      operationId: GetDevice
      summary: Get a device
      description: Retrieve information about an existing device, specified by its
        device ID. Its full details, including name, status and ID, are returned in
        the response object.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: device_id
        description: Device ID.
        required: true
        schema:
          type: string
          description: Device ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Device'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - IoT Devices
      operationId: UpdateDevice
      summary: Update a device
      description: Update the parameters of an existing device, specified by its device
        ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: device_id
        description: Device ID.
        required: true
        schema:
          type: string
          description: Device ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Device'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                  description: Description for the device.
                  nullable: true
                allow_insecure:
                  type: boolean
                  description: Defines whether to allow plain and server-authenticated
                    SSL connections in addition to mutually-authenticated ones.
                  nullable: true
                allow_multiple_connections:
                  type: boolean
                  description: Defines whether to allow multiple physical devices
                    to connect with this device's credentials.
                  nullable: true
                message_filters:
                  type: object
                  description: Filter-sets to restrict the topics the device can publish/subscribe
                    to.
                  properties:
                    publish:
                      type: object
                      description: Filtering rule to restrict topics the device can
                        publish to.
                      properties:
                        policy:
                          type: string
                          description: |-
                            How to use the topic list.
                            If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                            If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                          enum:
                          - unknown
                          - accept
                          - reject
                          default: unknown
                        topics:
                          type: array
                          description: List of topics to accept or reject. It must
                            be valid MQTT topics and up to 65535 characters.
                          nullable: true
                          items:
                            type: string
                      x-properties-order:
                      - policy
                      - topics
                    subscribe:
                      type: object
                      description: Filtering rule to restrict topics the device can
                        subscribe to.
                      properties:
                        policy:
                          type: string
                          description: |-
                            How to use the topic list.
                            If set to `accept`, all topics in the topics list will be allowed, with all other topics being denied.
                            If set to `reject`, all topics in the topics list will be denied, with all other topics being allowed.
                          enum:
                          - unknown
                          - accept
                          - reject
                          default: unknown
                        topics:
                          type: array
                          description: List of topics to accept or reject. It must
                            be valid MQTT topics and up to 65535 characters.
                          nullable: true
                          items:
                            type: string
                      x-properties-order:
                      - policy
                      - topics
                  x-properties-order:
                  - publish
                  - subscribe
                hub_id:
                  type: string
                  description: Change Hub for this device, additional fees may apply,
                    see IoT Hub pricing.
                  nullable: true
              x-properties-order:
              - description
              - allow_insecure
              - allow_multiple_connections
              - message_filters
              - hub_id
      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/iot/v1/regions/fr-par/devices/{device_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - IoT Devices
      operationId: DeleteDevice
      summary: Remove a device
      description: Remove a specific device from the specific Hub it is attached to.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: device_id
        description: Device ID.
        required: true
        schema:
          type: string
          description: Device ID.
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /iot/v1/regions/{region}/devices/{device_id}/certificate:
    get:
      tags:
      - IoT Devices
      operationId: GetDeviceCertificate
      summary: Get a device's certificate
      description: Get information for a particular PEM-encoded certificate, specified
        by the device ID. The response returns full details of the device, including
        its type of certificate.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: device_id
        description: Device ID.
        required: true
        schema:
          type: string
          description: Device ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.GetDeviceCertificateResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}/certificate"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}/certificate" \
            X-Auth-Token:$SCW_SECRET_KEY
    put:
      tags:
      - IoT Devices
      operationId: SetDeviceCertificate
      summary: Set a custom certificate on a device
      description: Switch the existing certificate of a given device with an EM-encoded
        custom certificate.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: device_id
        description: Device ID.
        required: true
        schema:
          type: string
          description: Device ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.SetDeviceCertificateResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                certificate_pem:
                  type: string
                  description: PEM-encoded custom certificate.
              required:
              - certificate_pem
              x-properties-order:
              - certificate_pem
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PUT \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"certificate_pem":"string"}' \
            "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}/certificate"
      - lang: HTTPie
        source: |-
          http PUT "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}/certificate" \
            X-Auth-Token:$SCW_SECRET_KEY \
            certificate_pem="string"
  /iot/v1/regions/{region}/devices/{device_id}/disable:
    post:
      tags:
      - IoT Devices
      operationId: DisableDevice
      summary: Disable a device
      description: Disable an existing device, specified by its device ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: device_id
        description: Device ID.
        required: true
        schema:
          type: string
          description: Device ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Device'
      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/iot/v1/regions/fr-par/devices/{device_id}/disable"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}/disable" \
            X-Auth-Token:$SCW_SECRET_KEY
  /iot/v1/regions/{region}/devices/{device_id}/enable:
    post:
      tags:
      - IoT Devices
      operationId: EnableDevice
      summary: Enable a device
      description: Enable a specific device, specified by its device ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: device_id
        description: Device ID.
        required: true
        schema:
          type: string
          description: Device ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Device'
      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/iot/v1/regions/fr-par/devices/{device_id}/enable"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}/enable" \
            X-Auth-Token:$SCW_SECRET_KEY
  /iot/v1/regions/{region}/devices/{device_id}/metrics:
    get:
      tags:
      - IoT Devices
      operationId: GetDeviceMetrics
      summary: Get a device's metrics
      description: Get the metrics of an existing device, specified by its device
        ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: device_id
        description: Device ID.
        required: true
        schema:
          type: string
          description: Device ID.
      - in: query
        name: start_date
        description: Start date used to compute the best scale for the returned metrics.
          (RFC 3339 format)
        schema:
          type: string
          description: Start date used to compute the best scale for the returned
            metrics. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.GetDeviceMetricsResponse'
      security:
      - scaleway: []
      deprecated: true
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}/metrics?start_date=2022-03-22T12:34:56.123456Z"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}/metrics" \
            X-Auth-Token:$SCW_SECRET_KEY \
            start_date==2022-03-22T12:34:56.123456Z
  /iot/v1/regions/{region}/devices/{device_id}/renew-certificate:
    post:
      tags:
      - IoT Devices
      operationId: RenewDeviceCertificate
      summary: Renew a device certificate
      description: Renew the certificate of an existing device, specified by its device
        ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: device_id
        description: Device ID.
        required: true
        schema:
          type: string
          description: Device ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.RenewDeviceCertificateResponse'
      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/iot/v1/regions/fr-par/devices/{device_id}/renew-certificate"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/iot/v1/regions/fr-par/devices/{device_id}/renew-certificate" \
            X-Auth-Token:$SCW_SECRET_KEY
  /iot/v1/regions/{region}/hubs:
    get:
      tags:
      - IoT Hubs
      operationId: ListHubs
      summary: List hubs
      description: List all Hubs in the specified zone. By default, returned Hubs
        are ordered by creation date in ascending order, though this can be modified
        via the `order_by` field.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          description: Page number to return, from the paginated results.
          format: int32
      - in: query
        name: page_size
        description: Number of Hubs to return within a page. Maximum value is 100.
        schema:
          type: integer
          description: Number of Hubs to return within a page. Maximum value is 100.
          format: uint32
      - in: query
        name: order_by
        description: Sort order of Hubs in the response.
        schema:
          type: string
          description: Sort order of Hubs in the response.
          enum:
          - name_asc
          - name_desc
          - status_asc
          - status_desc
          - product_plan_asc
          - product_plan_desc
          - created_at_asc
          - created_at_desc
          - updated_at_asc
          - updated_at_desc
          default: name_asc
      - in: query
        name: project_id
        description: Only list Hubs of this Project ID.
        schema:
          type: string
          description: Only list Hubs of this Project ID.
      - in: query
        name: organization_id
        description: Only list Hubs of this Organization ID.
        schema:
          type: string
          description: Only list Hubs of this Organization ID.
      - in: query
        name: name
        description: Hub name.
        schema:
          type: string
          description: Hub name.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.ListHubsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/hubs"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/hubs" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - IoT Hubs
      operationId: CreateHub
      summary: Create a hub
      description: Create a new Hub in the targeted region, specifying its configuration
        including name and product plan.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Hub'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Hub name (up to 255 characters).
                project_id:
                  type: string
                  description: Project/Organization ID to filter for, only Hubs from
                    this Project/Organization will be returned.
                product_plan:
                  type: string
                  description: Hub product plan.
                  enum:
                  - plan_unknown
                  - plan_shared
                  - plan_dedicated
                  - plan_ha
                  default: plan_shared
                disable_events:
                  type: boolean
                  description: Disable Hub events.
                  nullable: true
                events_topic_prefix:
                  type: string
                  description: Topic prefix (default '$SCW/events') of Hub events.
                  nullable: true
                twins_graphite_config:
                  type: object
                  description: BETA - not implemented yet.
                  properties:
                    push_uri:
                      type: string
                  nullable: true
                  x-properties-order:
                  - push_uri
                  x-one-of: twins_db_config
              required:
              - name
              - project_id
              - product_plan
              x-properties-order:
              - name
              - project_id
              - product_plan
              - disable_events
              - events_topic_prefix
              - twins_graphite_config
      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",
              "product_plan": "plan_shared",
              "project_id": "string"
            }' \
            "https://api.scaleway.com/iot/v1/regions/fr-par/hubs"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/iot/v1/regions/fr-par/hubs" \
            X-Auth-Token:$SCW_SECRET_KEY \
            name="string" \
            product_plan="plan_shared" \
            project_id="string"
  /iot/v1/regions/{region}/hubs/{hub_id}:
    get:
      tags:
      - IoT Hubs
      operationId: GetHub
      summary: Get a hub
      description: Retrieve information about an existing IoT Hub, specified by its
        Hub ID. Its full details, including name, status and endpoint, are returned
        in the response object.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: hub_id
        description: Hub ID.
        required: true
        schema:
          type: string
          description: Hub ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Hub'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - IoT Hubs
      operationId: UpdateHub
      summary: Update a hub
      description: Update the parameters of an existing IoT Hub, specified by its
        Hub ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: hub_id
        description: ID of the Hub you want to update.
        required: true
        schema:
          type: string
          description: ID of the Hub you want to update.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Hub'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Hub name (up to 255 characters).
                  nullable: true
                product_plan:
                  type: string
                  description: Hub product plan.
                  enum:
                  - plan_unknown
                  - plan_shared
                  - plan_dedicated
                  - plan_ha
                  default: plan_unknown
                disable_events:
                  type: boolean
                  description: Disable Hub events.
                  nullable: true
                events_topic_prefix:
                  type: string
                  description: Topic prefix of Hub events.
                  nullable: true
                enable_device_auto_provisioning:
                  type: boolean
                  description: Enable device auto provisioning.
                  nullable: true
                twins_graphite_config:
                  type: object
                  description: BETA - not implemented yet.
                  properties:
                    push_uri:
                      type: string
                  nullable: true
                  x-properties-order:
                  - push_uri
                  x-one-of: twins_db_config
              x-properties-order:
              - name
              - product_plan
              - disable_events
              - events_topic_prefix
              - enable_device_auto_provisioning
              - twins_graphite_config
      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/iot/v1/regions/fr-par/hubs/{hub_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - IoT Hubs
      operationId: DeleteHub
      summary: Delete a hub
      description: Delete an existing IoT Hub, specified by its Hub ID. Deleting a
        Hub is permanent, and cannot be undone.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: hub_id
        description: Hub ID.
        required: true
        schema:
          type: string
          description: Hub ID.
      - in: query
        name: delete_devices
        description: Defines whether to force the deletion of devices added to this
          Hub or reject the operation.
        schema:
          type: boolean
          description: Defines whether to force the deletion of devices added to this
            Hub or reject the operation.
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /iot/v1/regions/{region}/hubs/{hub_id}/ca:
    get:
      tags:
      - IoT Hubs
      operationId: GetHubCA
      summary: Get the certificate authority of a hub
      description: Get information for a particular PEM-encoded certificate, specified
        by the Hub ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: hub_id
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.GetHubCAResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}/ca"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}/ca" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - IoT Hubs
      operationId: SetHubCA
      summary: Set the certificate authority of a hub
      description: Set a particular PEM-encoded certificate, specified by the Hub
        ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: hub_id
        description: Hub ID.
        required: true
        schema:
          type: string
          description: Hub ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Hub'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ca_cert_pem:
                  type: string
                  description: CA's PEM-encoded certificate.
                challenge_cert_pem:
                  type: string
                  description: |-
                    Proof of possession of PEM-encoded certificate.
                    Challenge is a PEM-encoded certificate that acts as proof of possession of the CA. It must be signed by the CA, and have a Common Name equal to the Hub ID.
              required:
              - ca_cert_pem
              - challenge_cert_pem
              x-properties-order:
              - ca_cert_pem
              - challenge_cert_pem
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"ca_cert_pem":"string","challenge_cert_pem":"string"}' \
            "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}/ca"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}/ca" \
            X-Auth-Token:$SCW_SECRET_KEY \
            ca_cert_pem="string" \
            challenge_cert_pem="string"
  /iot/v1/regions/{region}/hubs/{hub_id}/disable:
    post:
      tags:
      - IoT Hubs
      operationId: DisableHub
      summary: Disable a hub
      description: Disable an existing IoT Hub, specified by its Hub ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: hub_id
        description: Hub ID.
        required: true
        schema:
          type: string
          description: Hub ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Hub'
      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/iot/v1/regions/fr-par/hubs/{hub_id}/disable"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}/disable" \
            X-Auth-Token:$SCW_SECRET_KEY
  /iot/v1/regions/{region}/hubs/{hub_id}/enable:
    post:
      tags:
      - IoT Hubs
      operationId: EnableHub
      summary: Enable a hub
      description: Enable an existing IoT Hub, specified by its Hub ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: hub_id
        description: Hub ID.
        required: true
        schema:
          type: string
          description: Hub ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Hub'
      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/iot/v1/regions/fr-par/hubs/{hub_id}/enable"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}/enable" \
            X-Auth-Token:$SCW_SECRET_KEY
  /iot/v1/regions/{region}/hubs/{hub_id}/metrics:
    get:
      tags:
      - IoT Hubs
      operationId: GetHubMetrics
      summary: Get a hub's metrics
      description: Get the metrics of an existing IoT Hub, specified by its Hub ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: hub_id
        description: Hub ID.
        required: true
        schema:
          type: string
          description: Hub ID.
      - in: query
        name: start_date
        description: Start date used to compute the best scale for returned metrics.
          (RFC 3339 format)
        schema:
          type: string
          description: Start date used to compute the best scale for returned metrics.
            (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.GetHubMetricsResponse'
      security:
      - scaleway: []
      deprecated: true
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}/metrics?start_date=2022-03-22T12:34:56.123456Z"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/hubs/{hub_id}/metrics" \
            X-Auth-Token:$SCW_SECRET_KEY \
            start_date==2022-03-22T12:34:56.123456Z
  /iot/v1/regions/{region}/networks:
    get:
      tags:
      - IoT Networks
      operationId: ListNetworks
      summary: List the networks
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          description: Page number to return, from the paginated results.
          format: int32
      - in: query
        name: page_size
        description: Number of networks to return. The maximum value is 100.
        schema:
          type: integer
          description: Number of networks to return. The maximum value is 100.
          format: uint32
      - in: query
        name: order_by
        description: Ordering of requested routes.
        schema:
          type: string
          description: Ordering of requested routes.
          enum:
          - name_asc
          - name_desc
          - type_asc
          - type_desc
          - created_at_asc
          - created_at_desc
          default: name_asc
      - in: query
        name: name
        description: Network name to filter for.
        schema:
          type: string
          description: Network name to filter for.
      - in: query
        name: hub_id
        description: Hub ID to filter for.
        schema:
          type: string
          description: Hub ID to filter for.
      - in: query
        name: topic_prefix
        description: Topic prefix to filter for.
        schema:
          type: string
          description: Topic prefix to filter for.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.ListNetworksResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/networks"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/networks" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - IoT Networks
      operationId: CreateNetwork
      summary: Create a new network
      description: Create a new network for an existing hub.  Beside the default network,
        you can add networks for different data providers. Possible network types
        are Sigfox and REST.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.CreateNetworkResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Network name.
                type:
                  type: string
                  description: Type of network to connect with.
                  enum:
                  - unknown
                  - sigfox
                  - rest
                  default: unknown
                hub_id:
                  type: string
                  description: Hub ID to connect the Network to.
                topic_prefix:
                  type: string
                  description: Topic prefix for the Network.
              required:
              - name
              - type
              - hub_id
              - topic_prefix
              x-properties-order:
              - name
              - type
              - hub_id
              - topic_prefix
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "hub_id": "string",
              "name": "string",
              "topic_prefix": "string",
              "type": "unknown"
            }' \
            "https://api.scaleway.com/iot/v1/regions/fr-par/networks"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/iot/v1/regions/fr-par/networks" \
            X-Auth-Token:$SCW_SECRET_KEY \
            hub_id="string" \
            name="string" \
            topic_prefix="string" \
            type="unknown"
  /iot/v1/regions/{region}/networks/{network_id}:
    get:
      tags:
      - IoT Networks
      operationId: GetNetwork
      summary: Retrieve a specific network
      description: Retrieve an existing network, specified by its network ID.  The
        response returns full details of the network, including its type, the topic
        prefix and its endpoint.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: network_id
        description: Network ID.
        required: true
        schema:
          type: string
          description: Network ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Network'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/networks/{network_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/networks/{network_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - IoT Networks
      operationId: DeleteNetwork
      summary: Delete a Network
      description: Delete an existing network, specified by its network ID. Deleting
        a network is permanent, and cannot be undone.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: network_id
        description: Network ID.
        required: true
        schema:
          type: string
          description: Network ID.
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/networks/{network_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/iot/v1/regions/fr-par/networks/{network_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /iot/v1/regions/{region}/routes:
    get:
      tags:
      - IoT Routes
      operationId: ListRoutes
      summary: List routes
      description: List all routes in the specified region. By default, returned routes
        are ordered by creation date in ascending order, though this can be modified
        via the `order_by` field.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: query
        name: page
        description: Page number to return, from the paginated results.
        schema:
          type: integer
          description: Page number to return, from the paginated results.
          format: int32
      - in: query
        name: page_size
        description: Number of routes to return within a page. Maximum value is 100.
        schema:
          type: integer
          description: Number of routes to return within a page. Maximum value is
            100.
          format: uint32
      - in: query
        name: order_by
        description: Ordering of requested routes.
        schema:
          type: string
          description: Ordering of requested routes.
          enum:
          - name_asc
          - name_desc
          - hub_id_asc
          - hub_id_desc
          - type_asc
          - type_desc
          - created_at_asc
          - created_at_desc
          default: name_asc
      - in: query
        name: hub_id
        description: Hub ID to filter for.
        schema:
          type: string
          description: Hub ID to filter for.
      - in: query
        name: name
        description: Route name to filter for.
        schema:
          type: string
          description: Route name to filter for.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.ListRoutesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/routes"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/routes" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - IoT Routes
      operationId: CreateRoute
      summary: Create a route
      description: |-
        Multiple kinds of routes can be created, such as:
        - Database Route
          Create a route that will record subscribed MQTT messages into your database.
          <b>You need to manage the database by yourself</b>.
        - REST Route.
          Create a route that will call a REST API on received subscribed MQTT messages.
        - Amazon S3 Routes.
          Create a route that will put subscribed MQTT messages into an Object Storage bucket.
          You need to create the bucket yourself and grant write access.
          Granting can be done with s3cmd (`s3cmd setacl s3://<my-bucket> --acl-grant=write:555c69c3-87d0-4bf8-80f1-99a2f757d031:555c69c3-87d0-4bf8-80f1-99a2f757d031`).
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Route'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Route name.
                hub_id:
                  type: string
                  description: Hub ID of the route.
                topic:
                  type: string
                  description: Topic the route subscribes to. It must be a valid MQTT
                    topic and up to 65535 characters.
                s3_config:
                  type: object
                  description: If creating Amazon S3 Routes, Amazon S3-specific configuration
                    fields.
                  properties:
                    bucket_region:
                      type: string
                    bucket_name:
                      type: string
                    object_prefix:
                      type: string
                    strategy:
                      $ref: '#/components/schemas/scaleway.iot.v1.Route.S3Config.S3Strategy'
                  nullable: true
                  x-properties-order:
                  - bucket_region
                  - bucket_name
                  - object_prefix
                  - strategy
                  x-one-of: Config
                db_config:
                  type: object
                  description: If creating Database Route, DB-specific configuration
                    fields.
                  properties:
                    host:
                      type: string
                    port:
                      type: integer
                      format: uint32
                    dbname:
                      type: string
                    username:
                      type: string
                    password:
                      type: string
                    query:
                      type: string
                    engine:
                      $ref: '#/components/schemas/scaleway.iot.v1.Route.DatabaseConfig.Engine'
                  nullable: true
                  x-properties-order:
                  - host
                  - port
                  - dbname
                  - username
                  - password
                  - query
                  - engine
                  x-one-of: Config
                rest_config:
                  type: object
                  description: If creating Rest Route, Rest-specific configuration
                    fields.
                  properties:
                    verb:
                      $ref: '#/components/schemas/scaleway.iot.v1.Route.RestConfig.HttpVerb'
                    uri:
                      type: string
                    headers:
                      type: object
                      properties:
                        <headerKey>:
                          type: string
                      additionalProperties: true
                  nullable: true
                  x-properties-order:
                  - verb
                  - uri
                  - headers
                  x-one-of: Config
              x-properties-order:
              - name
              - hub_id
              - topic
              - s3_config
              - db_config
              - rest_config
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "hub_id": "string",
              "name": "string",
              "topic": "string"
            }' \
            "https://api.scaleway.com/iot/v1/regions/fr-par/routes"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/iot/v1/regions/fr-par/routes" \
            X-Auth-Token:$SCW_SECRET_KEY \
            hub_id="string" \
            name="string" \
            topic="string"
  /iot/v1/regions/{region}/routes/{route_id}:
    get:
      tags:
      - IoT Routes
      operationId: GetRoute
      summary: Get a route
      description: Get information for a particular route, specified by the route
        ID. The response returns full details of the route, including its type, the
        topic it subscribes to and its configuration.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: route_id
        description: Route ID.
        required: true
        schema:
          type: string
          description: Route ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Route'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/routes/{route_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/routes/{route_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - IoT Routes
      operationId: UpdateRoute
      summary: Update a route
      description: Update the parameters of an existing route, specified by its route
        ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: route_id
        description: Route id.
        required: true
        schema:
          type: string
          description: Route id.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.Route'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Route name.
                  nullable: true
                topic:
                  type: string
                  description: Topic the route subscribes to. It must be a valid MQTT
                    topic and up to 65535 characters.
                  nullable: true
                s3_config:
                  type: object
                  description: When updating Amazon S3 Route, Amazon S3-specific configuration
                    fields.
                  properties:
                    bucket_region:
                      $ref: '#/components/schemas/google.protobuf.StringValue'
                    bucket_name:
                      $ref: '#/components/schemas/google.protobuf.StringValue'
                    object_prefix:
                      $ref: '#/components/schemas/google.protobuf.StringValue'
                    strategy:
                      $ref: '#/components/schemas/scaleway.iot.v1.Route.S3Config.S3Strategy'
                  nullable: true
                  x-properties-order:
                  - bucket_region
                  - bucket_name
                  - object_prefix
                  - strategy
                  x-one-of: Config
                db_config:
                  type: object
                  description: When updating Database Route, DB-specific configuration
                    fields.
                  properties:
                    host:
                      $ref: '#/components/schemas/google.protobuf.StringValue'
                    port:
                      $ref: '#/components/schemas/google.protobuf.UInt32Value'
                    dbname:
                      $ref: '#/components/schemas/google.protobuf.StringValue'
                    username:
                      $ref: '#/components/schemas/google.protobuf.StringValue'
                    password:
                      $ref: '#/components/schemas/google.protobuf.StringValue'
                    query:
                      $ref: '#/components/schemas/google.protobuf.StringValue'
                    engine:
                      $ref: '#/components/schemas/scaleway.iot.v1.Route.DatabaseConfig.Engine'
                  nullable: true
                  x-properties-order:
                  - host
                  - port
                  - dbname
                  - username
                  - password
                  - query
                  - engine
                  x-one-of: Config
                rest_config:
                  type: object
                  description: When updating Rest Route, Rest-specific configuration
                    fields.
                  properties:
                    verb:
                      $ref: '#/components/schemas/scaleway.iot.v1.Route.RestConfig.HttpVerb'
                    uri:
                      $ref: '#/components/schemas/google.protobuf.StringValue'
                    headers:
                      $ref: '#/components/schemas/scaleway.std.MapStringStringValue'
                  nullable: true
                  x-properties-order:
                  - verb
                  - uri
                  - headers
                  x-one-of: Config
              x-properties-order:
              - name
              - topic
              - s3_config
              - db_config
              - rest_config
      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/iot/v1/regions/fr-par/routes/{route_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/iot/v1/regions/fr-par/routes/{route_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - IoT Routes
      operationId: DeleteRoute
      summary: Delete a route
      description: Delete an existing route, specified by its route ID. Deleting a
        route is permanent, and cannot be undone.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: route_id
        description: Route ID.
        required: true
        schema:
          type: string
          description: Route ID.
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/routes/{route_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/iot/v1/regions/fr-par/routes/{route_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /iot/v1/regions/{region}/twins/{twin_id}:
    get:
      tags:
      - IoT Cloud Twins
      operationId: ListTwinDocuments
      summary: BETA - List the documents of a Cloud Twin
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: twin_id
        description: Twin ID.
        required: true
        schema:
          type: string
          description: Twin ID.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.ListTwinDocumentsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - IoT Cloud Twins
      operationId: DeleteTwinDocuments
      summary: BETA - Delete all the documents of a Cloud Twin
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: twin_id
        description: Twin ID.
        required: true
        schema:
          type: string
          description: Twin ID.
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /iot/v1/regions/{region}/twins/{twin_id}/documents/{document_name}:
    get:
      tags:
      - IoT Cloud Twins
      operationId: GetTwinDocument
      summary: BETA - Get a Cloud Twin Document
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: twin_id
        description: Twin ID.
        required: true
        schema:
          type: string
          description: Twin ID.
      - in: path
        name: document_name
        description: Name of the document.
        required: true
        schema:
          type: string
          description: Name of the document.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.TwinDocument'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}/documents/{document_name}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}/documents/{document_name}" \
            X-Auth-Token:$SCW_SECRET_KEY
    put:
      tags:
      - IoT Cloud Twins
      operationId: PutTwinDocument
      summary: BETA - Update a Cloud Twin Document
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: twin_id
        description: Twin ID.
        required: true
        schema:
          type: string
          description: Twin ID.
      - in: path
        name: document_name
        description: Name of the document.
        required: true
        schema:
          type: string
          description: Name of the document.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.TwinDocument'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                version:
                  type: integer
                  description: |-
                    Version of the document to update.
                    If set, ensures that the current version of the document matches before persisting the update.
                  format: uint32
                  nullable: true
                data:
                  type: object
                  description: |-
                    Data of the new document.
                    New data that will replace the contents of the document.
                  properties:
                    <fieldKey>:
                      type: object
              x-properties-order:
              - version
              - data
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PUT \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}/documents/{document_name}"
      - lang: HTTPie
        source: |-
          http PUT "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}/documents/{document_name}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - IoT Cloud Twins
      operationId: PatchTwinDocument
      summary: BETA - Patch a Cloud Twin Document
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: twin_id
        description: Twin ID.
        required: true
        schema:
          type: string
          description: Twin ID.
      - in: path
        name: document_name
        description: Name of the document.
        required: true
        schema:
          type: string
          description: Name of the document.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.iot.v1.TwinDocument'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                version:
                  type: integer
                  description: |-
                    The version of the document to update.
                    If set, ensures that the current version of the document matches before persisting the update.
                  format: uint32
                  nullable: true
                data:
                  type: object
                  description: |-
                    Patch data.
                    A json data that will be applied on the document's current data.
                    Patching rules:
                    * The patch goes recursively through the patch objects.
                    * If the patch object property is null, it is removed from the final object.
                    * If the patch object property is a value (number, strings, bool, arrays), it is replaced.
                    * If the patch object property is an object, the previous rules will be applied recursively on it.
                  properties:
                    <fieldKey>:
                      type: object
              x-properties-order:
              - version
              - data
      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/iot/v1/regions/fr-par/twins/{twin_id}/documents/{document_name}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}/documents/{document_name}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - IoT Cloud Twins
      operationId: DeleteTwinDocument
      summary: BETA - Delete a Cloud Twin Document
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
      - in: path
        name: twin_id
        description: Twin ID.
        required: true
        schema:
          type: string
          description: Twin ID.
      - in: path
        name: document_name
        description: Name of the document.
        required: true
        schema:
          type: string
          description: Name of the document.
      responses:
        "204":
          description: ""
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}/documents/{document_name}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/iot/v1/regions/fr-par/twins/{twin_id}/documents/{document_name}" \
            X-Auth-Token:$SCW_SECRET_KEY
