Update configuration
- PUT
- /workspaces
- /:workspace
- /distributions
- /:distribution_id
- /routes
- /:route_id
Update the configuration of an existing route in a distribution with a PUT request, replacing its settings with the ones you send.
Request example
curl -X PUT "https://api.buddy.works/workspaces/:workspace/distributions/:distribution_id/routes/:route_id" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"subdomain": "updated-api",
"targets": {
"default": {
"type": "EXTERNAL",
"external_url": "https://updated.example.com"
}
},
"note": "Notes about this resource",
"agent_note": "my_custom_field: note for agent"
}'EXAMPLE RESPONSE
{
"url": "https://api.buddy.works/workspaces/my-workspace/distributions/gNYmaWYw/routes/dybEM2bg?project_name=my-project",
"html_url": "https://app.buddy.works/my-workspace/my-project/routing/gNYmaWYw/route/dybEM2bg",
"id": "dybEM2bg",
"type": "DIRECT_PROXY",
"subdomain": "sandbox",
"domain": "buddy.works",
"path": "",
"targets": {
"Default": {
"type": "SANDBOX",
"sandbox": {
"id": "ynjuqe2kov258",
"endpoint": "www"
}
}
},
"note": "Notes about this resource",
"agent_note": "my_custom_field: note for agent"
}STATUS
200 OK