Routes
Upsert a Route
Changed onCreate or Update Route using ID or name.
put/{workspace}/routes/{RouteIdOrName}
Request
- Base URL: http://localhost:8001
- URL: http://localhost:8001/{workspace}/routes/{RouteIdOrName}
- Auth: API key in header Kong-Admin-Token
Path parameters
workspacestring required
Example:team-payments
The name of the workspace
Request body
Example request
{
"hosts": [
"foo.example.com",
"foo.example.us"
],
"id": "56c4566c-14cc-4132-9011-4139fcbbe50a",
"name": "example-route",
"paths": [
"/v1",
"/v2"
],
"service": {
"id": "bd380f99-659d-415e-b0e7-72ea05df3218"
}
}Response
Successfully upserted Route
Example response
{
"hosts": [
"foo.example.com",
"foo.example.us"
],
"id": "56c4566c-14cc-4132-9011-4139fcbbe50a",
"name": "example-route",
"paths": [
"/v1",
"/v2"
],
"service": {
"id": "bd380f99-659d-415e-b0e7-72ea05df3218"
}
}Changes
- info
the
request property default value changed fromhttphttpstohttps - info
the
response's property default value changed fromhttphttpstohttpsfor the status
- info
- info
endpoint added
- info