Scaleway logo
Edge Services API

A route stage is part of a pipeline. It allows you to configure routes towards other stages of the Edge Services pipeline, based on a defined set of rules (using HTTP method or path). For now, the main use case for a route stage is to allow all requests that match certain rules to bypass a WAF stage and route directly to the backend stage. More functionality for the route stage is planned for the future. Note that including a route stage in your pipeline is optional.


List route stages

GET
https://api.scaleway.com
/edge-services/v1beta1/pipelines/{pipeline_id}/route-stages

List all route stages, for a given pipeline. By default, the route stages returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.

List route stages › path Parameters

pipeline_id
​string · required

Pipeline ID to filter for. Only route stages from this pipeline will be returned.

List route stages › query Parameters

Sort order of route stages in the response.

Enum values:
created_at_asc
created_at_desc
Default: created_at_asc
page
​integer · int32

Page number to return, from the paginated results.

page_size
​integer · uint32

Number of route stages to return per page.

List route stages › Responses

200

Paginated list of summarized route stages.

total_count
​integer · uint64

Count of all route stages matching the requested criteria.


Create route stage

POST
https://api.scaleway.com
/edge-services/v1beta1/pipelines/{pipeline_id}/route-stages

Create a new route stage. You must specify the waf_stage_id or backend_stage_id fields to customize the route.

Create route stage › path Parameters

pipeline_id
​string · required

Pipeline ID the route stage belongs to. (UUID format)

Create route stage › Request Body

waf_stage_id
​string | null

ID of the WAF stage HTTP requests should be forwarded to when no rules are matched. (UUID format)

backend_stage_id
​string | null

ID of the backend stage HTTP requests should be forwarded to when no rules are matched. (UUID format)

Create route stage › Responses

200
id
​string

ID of the route stage.

pipeline_id
​string

Pipeline ID the route stage belongs to.

waf_stage_id
​string | null

ID of the WAF stage HTTP requests should be forwarded to when no rules are matched. (UUID format)

backend_stage_id
​string | null

ID of the backend stage HTTP requests should be forwarded to when no rules are matched. (UUID format)

status
​scaleway.edge_services.v1beta1.StageStatus · enum

Current status of the stage.

Enum values:
unknown_status
inactive
active
Default: unknown_status
created_at
​string | null · date-time

Date the route stage was created. (RFC 3339 format)

updated_at
​string | null · date-time

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


Get route stage

GET
https://api.scaleway.com
/edge-services/v1beta1/route-stages/{route_stage_id}

Retrieve information about an existing route stage, specified by its route_stage_id. The summary of the route stage (without route rules) is returned in the response object.

Get route stage › path Parameters

route_stage_id
​string · required

ID of the requested route stage.

Get route stage › Responses

200
id
​string

ID of the route stage.

pipeline_id
​string

Pipeline ID the route stage belongs to.

waf_stage_id
​string | null

ID of the WAF stage HTTP requests should be forwarded to when no rules are matched. (UUID format)

backend_stage_id
​string | null

ID of the backend stage HTTP requests should be forwarded to when no rules are matched. (UUID format)

status
​scaleway.edge_services.v1beta1.StageStatus · enum

Current status of the stage.

Enum values:
unknown_status
inactive
active
Default: unknown_status
created_at
​string | null · date-time

Date the route stage was created. (RFC 3339 format)

updated_at
​string | null · date-time

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


Update route stage

PATCH
https://api.scaleway.com
/edge-services/v1beta1/route-stages/{route_stage_id}

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

Update route stage › path Parameters

route_stage_id
​string · required

ID of the route stage to update.

Update route stage › Request Body

waf_stage_id
​string | null

ID of the WAF stage HTTP requests should be forwarded to when no rules are matched. (UUID format)

backend_stage_id
​string | null

ID of the backend stage HTTP requests should be forwarded to when no rules are matched. (UUID format)

Update route stage › Responses

200
id
​string

ID of the route stage.

pipeline_id
​string

Pipeline ID the route stage belongs to.

waf_stage_id
​string | null

ID of the WAF stage HTTP requests should be forwarded to when no rules are matched. (UUID format)

backend_stage_id
​string | null

ID of the backend stage HTTP requests should be forwarded to when no rules are matched. (UUID format)

status
​scaleway.edge_services.v1beta1.StageStatus · enum

Current status of the stage.

Enum values:
unknown_status
inactive
active
Default: unknown_status
created_at
​string | null · date-time

Date the route stage was created. (RFC 3339 format)

updated_at
​string | null · date-time

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


Delete route stage

DELETE
https://api.scaleway.com
/edge-services/v1beta1/route-stages/{route_stage_id}

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

Delete route stage › path Parameters

route_stage_id
​string · required

ID of the route stage to delete.

Delete route stage › Responses

No data returned

List route rules

GET
https://api.scaleway.com
/edge-services/v1beta1/route-stages/{route_stage_id}/route-rules

List all route rules of an existing route stage, specified by its route_stage_id.

List route rules › path Parameters

route_stage_id
​string · required

Route stage ID to filter for. Only route rules from this route stage will be returned.

List route rules › Responses

200

List of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the stage defined by waf_stage_id or backend_stage_id.

total_count
​integer · uint64

Count of all route rules matching the requested criteria.


Set route rules

PUT
https://api.scaleway.com
/edge-services/v1beta1/route-stages/{route_stage_id}/route-rules

Set the rules of an existing route stage, specified by its route_stage_id.

Set route rules › path Parameters

route_stage_id
​string · required

ID of the route stage to update. (UUID format)

Set route rules › Request Body

List of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the stage defined by waf_stage_id or backend_stage_id.

Set route rules › Responses

200

List of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the stage defined by waf_stage_id or backend_stage_id.


Add route rules

POST
https://api.scaleway.com
/edge-services/v1beta1/route-stages/{route_stage_id}/route-rules

Add route rules to an existing route stage, specified by its route_stage_id.

Add route rules › path Parameters

route_stage_id
​string · required

ID of the route stage to update. (UUID format)

Add route rules › Request Body

List of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the stage defined by waf_stage_id or backend_stage_id.

after_position
​integer | null · uint64

Add rules after the given position.

before_position
​integer | null · uint64

Add rules before the given position.

Add route rules › Responses

200

List of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the stage defined by waf_stage_id or backend_stage_id.