PATCH /v1/projects/{projectId}/routes/{routeId}

Replace a routing rule identified by its ID, or restore it from the current production version. Stages a new version with the modified route.

Servers

Path parameters

Name Type Required Description
projectId String Yes
routeId String Yes

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Query parameters

Name Type Required Description
teamId String No

The Team identifier to perform the request on behalf of.

slug String No

The Team slug to perform the request on behalf of.

Request body fields

Name Type Required Description
route Object No

The full route object to replace the existing route with

route.name String Yes
route.description String No
route.route Object Yes
route.route.transforms[] Array No
route.route.transforms[].env[] Array No
route.route.transforms[].op String No

Valid values:

  • "set"
  • "delete"
  • "append"
route.route.transforms[].target Object No
route.route.transforms[].type String No

Valid values:

  • "request.query"
  • "response.headers"
  • "request.headers"
route.route.transforms[].args No
route.route.missing[] Array No
route.route.missing[].key String No
route.route.missing[].type String No

Valid values:

  • "cookie"
  • "host"
  • "query"
  • "header"
route.route.missing[].value String No
route.route.src String Yes
route.route.dest String No
route.route.status Integer No
route.route.respectOriginCacheControl Boolean No
route.route.caseSensitive Boolean No
route.route.headers Object No
route.route.has[] Array No
route.route.has[].key String No
route.route.has[].type String No

Valid values:

  • "cookie"
  • "host"
  • "query"
  • "header"
route.route.has[].value String No
route.srcSyntax String No

Pattern syntax type. If not provided, inferred from pattern.

Valid values:

  • "path-to-regexp"
  • "regex"
  • "equals"
route.enabled Boolean No
restore Boolean No

If true, restores the staged route to the value in the production version.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.