Skip to content
Docs

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

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectNoRequest body for this tool.

Assign an Alias.

Parameters

ParameterTypeRequiredDescription
idstringYesThe deployment or alias ID or URL to assign from
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectYesRequest body for this tool.

Edit a routing rule.

Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
routeIdstringYesThe route ID.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectYesRequest body for this tool.

Generate a routing rule from natural language.

Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectNoRequest body for this tool.

Retrieves an Alias for the given host name or alias ID.

Parameters

ParameterTypeRequiredDescription
fromnumberNoGet the alias only if it was created after the provided timestamp
idOrAliasstringYesThe alias or alias ID to be retrieved
projectIdstringNoGet the alias only if it is assigned to the provided project ID
sincenumberNoGet the alias only if it was created after this JavaScript timestamp
untilnumberNoGet the alias only if it was created before this JavaScript timestamp
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

List aliases.

Parameters

ParameterTypeRequiredDescription
domainArray<string> | stringNoGet only aliases of the given domain name
fromnumberNoGet only aliases created after the provided timestamp
limitnumberNoMaximum number of aliases to list from a request
projectIdstringNoFilter aliases from the given projectId
sincenumberNoGet aliases created after this JavaScript timestamp
untilnumberNoGet aliases created before this JavaScript timestamp
rollbackDeploymentIdstringNoGet aliases that would be rolled back for the given deployment
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

Get the version history for a project's redirects.

Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

Gets project-level redirects.

Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
versionIdstringNo-
qstringNo-
diffboolean | stringNo-
pageintegerNoMinimum: 1.
perPageintegerNoMinimum: 10. Maximum: 250.
sortBystringNoAllowed values: "source", "destination", "statusCode".
sortOrderstringNoAllowed values: "asc", "desc".
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

List Deployment Aliases.

Parameters

ParameterTypeRequiredDescription
idstringYesThe ID of the deployment the aliases should be listed for
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

Get routing rule version history.

Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

Get project routing rules.

Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
versionIdstringNo-
qstringNo-
filterstringNoAllowed values: "rewrite", "redirect", "set_status", "transform".
diffboolean | stringNo-
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.

Update the protection bypass for a URL.

Parameters

ParameterTypeRequiredDescription
idstringYesThe alias or deployment ID
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectNoRequest 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

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectNoRequest body for this tool.

Stages new redirects for a project.

Parameters

ParameterTypeRequiredDescription
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectNoRequest body for this tool.

Stage routing rules.

Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectYesRequest body for this tool.

Promote a staging version to production or restore a previous production version.

Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectNoRequest body for this tool.

Promote, restore, or discard a routing rule version.

Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID.
teamIdstringNoTeam ID to use for this operation.
slugstringNoTeam slug to use for this operation. Use instead of teamId.
requestBodyobjectNoRequest body for this tool.

Was this helpful?

supported.