PUT /v1/projects/{projectId}/routes

Stage routing rules for a project. Set overwrite to true to replace all existing rules, or omit it to merge with existing rules by ID. Returns the new staged version.

Servers

Path parameters

Name Type Required Description
projectId 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
routes[] Array No
routes[].id String Yes
routes[].name String Yes
routes[].description String No
routes[].route Object Yes
routes[].route.transforms[] Array No
routes[].route.transforms[].env[] Array No
routes[].route.transforms[].op String No

Valid values:

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

Valid values:

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

Valid values:

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

Valid values:

  • "cookie"
  • "host"
  • "query"
  • "header"
routes[].route.has[].value String No
routes[].enabled Boolean No
overwrite Boolean No

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.