POST /v1/projects/{projectId}/routes

Add a single routing rule to a project at a specified position. Defaults to the end of the list if no position is provided. The route is enabled by default. Stages a new version with the added route.

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
route Object Yes
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
position Object No

Controls where the route is inserted. Defaults to "end" if omitted.

position.referenceId String No

Route ID to insert after/before. Required for "after"/"before".

position.placement String No

"after"/"before" require referenceId.

Valid values:

  • "start"
  • "before"
  • "after"
  • "end"

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.