Upstreams
Create a new Upstream
Create a new Upstream
post/{workspace}/upstreams
Path parameters
workspacestring required
Example:team-payments
The name of the workspace
Request body
Example request
{
"algorithm": "round-robin",
"hash_fallback": "none",
"hash_on": "none",
"hash_on_cookie_path": "/",
"healthchecks": {
"active": {
"concurrency": 10,
"healthy": {
"http_statuses": [
200,
302
],
"interval": 0,
"successes": 0
},
"http_path": "/",
"https_verify_certificate": true,
"timeout": 1,
"type": "http",
"unhealthy": {
"http_failures": 0,
"http_statuses": [
429,
404,
500,
501,
502,
503,
504,
505
],
"interval": 0,
"tcp_failures": 0,
"timeouts": 0
}
},
"passive": {
"healthy": {
"http_statuses": [
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308
],
"successes": 0
},
"type": "http",
"unhealthy": {
"http_failures": 0,
"http_statuses": [
429,
500,
503
],
"tcp_failures": 0,
"timeouts": 0
}
},
"threshold": 0
},
"id": "6eed5e9c-5398-4026-9a4c-d48f18a2431e",
"name": "api.example.internal",
"slots": 10000
}Response
Successfully created Upstream
Example response
{
"algorithm": "round-robin",
"hash_fallback": "none",
"hash_on": "none",
"hash_on_cookie_path": "/",
"healthchecks": {
"active": {
"concurrency": 10,
"healthy": {
"http_statuses": [
200,
302
],
"interval": 0,
"successes": 0
},
"http_path": "/",
"https_verify_certificate": true,
"timeout": 1,
"type": "http",
"unhealthy": {
"http_failures": 0,
"http_statuses": [
429,
404,
500,
501,
502,
503,
504,
505
],
"interval": 0,
"tcp_failures": 0,
"timeouts": 0
}
},
"passive": {
"healthy": {
"http_statuses": [
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308
],
"successes": 0
},
"type": "http",
"unhealthy": {
"http_failures": 0,
"http_statuses": [
429,
500,
503
],
"tcp_failures": 0,
"timeouts": 0
}
},
"threshold": 0
},
"id": "6eed5e9c-5398-4026-9a4c-d48f18a2431e",
"name": "api.example.internal",
"slots": 10000
}