Services - Routes

Add redirect/rewrite rules

Changed on

Add redirect/rewrite rules to the service with the provided ID.

post/services/{serviceId}/routes

Request

  • Base URL
    https://api.render.com/v1
  • Auth
    HTTP bearer

Request body

type'redirect' | 'rewrite' required
sourcestring required
destinationstring required
priorityinteger

Redirect and Rewrite Rules are applied in priority order starting at 0. Defaults to last in the priority list.

Example request

{
  "source": "/:bar/foo",
  "destination": "/foo/:bar"
}

Response

Created

idstring required
type'redirect' | 'rewrite' required
sourcestring required
destinationstring required
priorityinteger required

Redirect and Rewrite Rules are applied in priority order starting at 0

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status