Skip to navigation

Add a target

View as Markdown

Adds a destination to the route. Targeting rules decide which target a visitor gets; the route’s default is the fallback. Only supports http/https for scheme.

Authentication

Authorizationstring

API key credential, sent as Key <base64(keyId:secret)>.

Path parameters

domain_idstringRequired
route_idstringRequired

Request

Request body for models.RouteTargetPostObject
urlstringRequired
descriptionstringOptional
enabledbooleanOptional
Whether the target may be resolved for the proxy. Disabled targets never receive traffic.
selectorValuestringOptional
Value the route's selector must match for this target.
weightlongOptional>=0
Relative share for the weighted strategy.

Response

Created
bodyobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error