Routing
Control where requests go with project routing rules, redirects, and deployment aliases. You can stage changes, review version history, and promote or restore a routing configuration.
Add a routing rule.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Assign an Alias.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The deployment or alias ID or URL to assign from |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | Yes | Request body for this tool. |
Edit a routing rule.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
routeId | string | Yes | The route ID. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | Yes | Request body for this tool. |
Generate a routing rule from natural language.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Retrieves an Alias for the given host name or alias ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | number | No | Get the alias only if it was created after the provided timestamp |
idOrAlias | string | Yes | The alias or alias ID to be retrieved |
projectId | string | No | Get the alias only if it is assigned to the provided project ID |
since | number | No | Get the alias only if it was created after this JavaScript timestamp |
until | number | No | Get the alias only if it was created before this JavaScript timestamp |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
List aliases.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
domain | Array<string> | string | No | Get only aliases of the given domain name |
from | number | No | Get only aliases created after the provided timestamp |
limit | number | No | Maximum number of aliases to list from a request |
projectId | string | No | Filter aliases from the given projectId |
since | number | No | Get aliases created after this JavaScript timestamp |
until | number | No | Get aliases created before this JavaScript timestamp |
rollbackDeploymentId | string | No | Get aliases that would be rolled back for the given deployment |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Get the version history for a project's redirects.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Gets project-level redirects.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
versionId | string | No | - |
q | string | No | - |
diff | boolean | string | No | - |
page | integer | No | Minimum: 1. |
perPage | integer | No | Minimum: 10. Maximum: 250. |
sortBy | string | No | Allowed values: "source", "destination", "statusCode". |
sortOrder | string | No | Allowed values: "asc", "desc". |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
List Deployment Aliases.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The ID of the deployment the aliases should be listed for |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Get routing rule version history.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Get project routing rules.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
versionId | string | No | - |
q | string | No | - |
filter | string | No | Allowed values: "rewrite", "redirect", "set_status", "transform". |
diff | boolean | string | No | - |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Update the protection bypass for a URL.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The alias or deployment ID |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Restores the provided redirects in the staging version to the value in the production version. If no production version exists, removes the redirects from staging.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Stages new redirects for a project.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Stage routing rules.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | Yes | Request body for this tool. |
Promote a staging version to production or restore a previous production version.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Promote, restore, or discard a routing rule version.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Was this helpful?