Skip to content
Start here

Routes

List Routes
client.workers.routes.list(RouteListParams { zone_id } params, RequestOptionsoptions?): SinglePage<RouteListResponse { id, pattern, script } >
GET/zones/{zone_id}/workers/routes
Get Route
client.workers.routes.get(stringrouteId, RouteGetParams { zone_id } params, RequestOptionsoptions?): RouteGetResponse { id, pattern, script }
GET/zones/{zone_id}/workers/routes/{route_id}
Create Route
client.workers.routes.create(RouteCreateParams { zone_id, pattern, script } params, RequestOptionsoptions?): RouteCreateResponse { id, pattern, script }
POST/zones/{zone_id}/workers/routes
Update Route
client.workers.routes.update(stringrouteId, RouteUpdateParams { zone_id, pattern, script } params, RequestOptionsoptions?): RouteUpdateResponse { id, pattern, script }
PUT/zones/{zone_id}/workers/routes/{route_id}
Delete Route
client.workers.routes.delete(stringrouteId, RouteDeleteParams { zone_id } params, RequestOptionsoptions?): RouteDeleteResponse { id }
DELETE/zones/{zone_id}/workers/routes/{route_id}
ModelsExpand Collapse
RouteListResponse { id, pattern, script }
id: string

Identifier.

maxLength32
pattern: string

Pattern to match incoming requests against. Learn more.

script?: string

Name of the script to run if the route matches.

RouteGetResponse { id, pattern, script }
id: string

Identifier.

maxLength32
pattern: string

Pattern to match incoming requests against. Learn more.

script?: string

Name of the script to run if the route matches.

RouteCreateResponse { id, pattern, script }
id: string

Identifier.

maxLength32
pattern: string

Pattern to match incoming requests against. Learn more.

script?: string

Name of the script to run if the route matches.

RouteUpdateResponse { id, pattern, script }
id: string

Identifier.

maxLength32
pattern: string

Pattern to match incoming requests against. Learn more.

script?: string

Name of the script to run if the route matches.

RouteDeleteResponse { id }
id?: string

Identifier.

maxLength32