Scaleway logo
IoT Hub API

Set up managed routes to control how IoT device messages are sent and received within a Hub


List routes

GET
https://api.scaleway.com
/iot/v1/regions/{region}/routes

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.

List routes › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par

List routes › query Parameters

page
​integer · int32

Page number to return, from the paginated results.

page_size
​integer · uint32

Number of routes to return within a page. Maximum value is 100.

order_by
​scaleway.iot.v1.ListRoutesRequest.OrderBy · enum

Ordering of requested routes.

Enum values:
name_asc
name_desc
hub_id_asc
hub_id_desc
type_asc
type_desc
created_at_asc
created_at_desc
Default: name_asc
hub_id
​string

Hub ID to filter for.

name
​string

Route name to filter for.

List routes › Responses

200
total_count
​integer · uint32

Total number of routes.

Page of routes.


Create a route

POST
https://api.scaleway.com
/iot/v1/regions/{region}/routes

Multiple kinds of routes can be created, such as:

  • Database Route Create a route that will record subscribed MQTT messages into your database. You need to manage the database by yourself.
  • 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).

Create a route › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par

Create a route › Request Body

name
​string

Route name.

hub_id
​string

Hub ID of the route.

topic
​string

Topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters.

​

If creating Amazon S3 Routes, Amazon S3-specific configuration fields.

​

If creating Database Route, DB-specific configuration fields.

​

If creating Rest Route, Rest-specific configuration fields.

Create a route › Responses

200
id
​string

Route ID.

name
​string

Route name.

hub_id
​string

Hub ID of the route.

topic
​string

Topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters.

type
​scaleway.iot.v1.Route.RouteType · enum

Route type.

Enum values:
unknown
s3
database
rest
Default: unknown
created_at
​string | null · date-time

Date at which the route was created. (RFC 3339 format)

​

When using Amazon S3 Routes, Amazon S3-specific configuration fields.

​

When using Database Route, DB-specific configuration fields.

​

When using Rest Route, Rest-specific configuration fields.

updated_at
​string | null · date-time

Date at which the route was last updated. (RFC 3339 format)

region
​string

Region of the route.


Get a route

GET
https://api.scaleway.com
/iot/v1/regions/{region}/routes/{route_id}

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.

Get a route › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
route_id
​string · required

Route ID.

Get a route › Responses

200
id
​string

Route ID.

name
​string

Route name.

hub_id
​string

Hub ID of the route.

topic
​string

Topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters.

type
​scaleway.iot.v1.Route.RouteType · enum

Route type.

Enum values:
unknown
s3
database
rest
Default: unknown
created_at
​string | null · date-time

Date at which the route was created. (RFC 3339 format)

​

When using Amazon S3 Routes, Amazon S3-specific configuration fields.

​

When using Database Route, DB-specific configuration fields.

​

When using Rest Route, Rest-specific configuration fields.

updated_at
​string | null · date-time

Date at which the route was last updated. (RFC 3339 format)

region
​string

Region of the route.


Delete a route

DELETE
https://api.scaleway.com
/iot/v1/regions/{region}/routes/{route_id}

Delete an existing route, specified by its route ID. Deleting a route is permanent, and cannot be undone.

Delete a route › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
route_id
​string · required

Route ID.

Delete a route › Responses

No data returned

Update a route

PATCH
https://api.scaleway.com
/iot/v1/regions/{region}/routes/{route_id}

Update the parameters of an existing route, specified by its route ID.

Update a route › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
route_id
​string · required

Route id.

Update a route › Request Body

name
​string | null

Route name.

topic
​string | null

Topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters.

​

When updating Amazon S3 Route, Amazon S3-specific configuration fields.

​

When updating Database Route, DB-specific configuration fields.

​

When updating Rest Route, Rest-specific configuration fields.

Update a route › Responses

200
id
​string

Route ID.

name
​string

Route name.

hub_id
​string

Hub ID of the route.

topic
​string

Topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters.

type
​scaleway.iot.v1.Route.RouteType · enum

Route type.

Enum values:
unknown
s3
database
rest
Default: unknown
created_at
​string | null · date-time

Date at which the route was created. (RFC 3339 format)

​

When using Amazon S3 Routes, Amazon S3-specific configuration fields.

​

When using Database Route, DB-specific configuration fields.

​

When using Rest Route, Rest-specific configuration fields.

updated_at
​string | null · date-time

Date at which the route was last updated. (RFC 3339 format)

region
​string

Region of the route.