HTTP API:
curl -X POST localhost:6666/proxies -H "Content-Type: application/json" -d '{ "name": "bolt_core_1", "listen": "[::]:7687", "upstream": "core1:17687", "enabled": true}'
CLI:
toxiproxy-cli -h localhost:6666 create --listen '[::]:7687' --upstream core1:17687 bolt_core_1
HTTP API:
curl -X POST localhost:6666/proxies -H "Content-Type: application/json" -d '{ "name": "bolt_core_2", "listen": "[::]:8687", "upstream": "core2:27687", "enabled": true}'
CLI:
toxiproxy-cli -h localhost:6666 create --listen '[::]:8687' --upstream core2:27687 bolt_core_2
HTTP API:
curl -X POST localhost:6666/proxies -H "Content-Type: application/json" -d '{ "name": "bolt_core_3", "listen": "[::]:9687", "upstream": "core3:37687", "enabled": true}'
CLI:
toxiproxy-cli -h localhost:6666 create --listen '[::]:9687' --upstream core3:37687 bolt_core_3
HTTP API:
curl -X POST localhost:6666/populate \
-H "Content-Type: application/json" \
-d '[
{ "name": "bolt_core_1", "listen": "[::]:7687", "upstream": "core1:17687", "enabled": true},
{ "name": "bolt_core_2", "listen": "[::]:8687", "upstream": "core2:27687", "enabled": true},
{ "name": "bolt_core_3", "listen": "[::]:9687", "upstream": "core3:37687", "enabled": true}
]'
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_1 -H "Content-Type: application/json" -d '{"listen": "[::]:7687", "upstream": "core1:17687", "enabled": false}'
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_2 -H "Content-Type: application/json" -d '{"listen": "[::]:8687", "upstream": "core2:27687", "enabled": false}'
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_3 -H "Content-Type: application/json" -d '{"listen": "[::]:9687", "upstream": "core2:37687", "enabled": false}'
HTTP API:
curl -X DELETE localhost:6666/proxies/bolt_core_X -H "Content-Type: application/json"
CLI:
toxiproxy-cli -h localhost:6666 delete bolt_core_X
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_X/toxics -H "Content-Type: application/json" -d '{ "type": "latency", "attributes":{"latency":30000,"jitter":1000}, "stream":"upstream"}'
CLI:
toxiproxy-cli -h localhost:6666 toxic add -t latency -a latency=30000 -a jitter=1000 --upstream raft_core_X
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_X/toxics -H "Content-Type: application/json" -d '{ "type": "bandwidth", "attributes":{"rate":10}, "stream":"upstream"}'
CLI:
toxiproxy-cli -h localhost:6666 toxic add -t bandwidth -a rate=50000 --upstream bolt_core_X
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_X/toxics -H "Content-Type: application/json" -d '{ "type": "slow_close", "attributes":{"delay":20000}, "stream":"upstream"}'
CLI:
toxiproxy-cli -h localhost:6666 toxic add -t slow_close -a delay=20000 --upstream bolt_core_X
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_X/toxics -H "Content-Type: application/json" -d '{ "type": "timeout", "attributes":{"timeout":10000}, "stream":"upstream"}'
CLI:
toxiproxy-cli -h localhost:6666 toxic add -t timeout -a timeout=10000 --upstream bolt_core_X
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_X/toxics -H "Content-Type: application/json" -d '{ "type": "reset_peer", "attributes":{"timeout":1000}, "stream":"upstream"}'
CLI:
toxiproxy-cli -h localhost:6666 toxic add -t reset_peer -a timeout=10000 --upstream bolt_core_X
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_X/toxics -H "Content-Type: application/json" -d '{ "type": "slicer", "attributes":{"average_size":100, "size_variation":10,"delay":100}, "stream":"upstream"}'
CLI:
toxiproxy-cli -h localhost:6666 toxic add -t slicer -a average_size=100 -a size_variation=10 -a delay=100 --upstream bolt_core_X
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_X/toxics -H "Content-Type: application/json" -d '{ "type": "limit_data", "attributes":{"bytes":100}, "stream":"upstream"}'
CLI:
toxiproxy-cli -h localhost:6666 toxic add -t limit_data -a average_size=100 -a bytes=100 --upstream bolt_core_X
HTTP API:
curl -X POST localhost:6666/proxies/bolt_core_X/toxics/latency_upstream -H "Content-Type: application/json" -d '{ "type": "latency", "attributes":{"latency":20000,"jitter":800}}'
CLI:
toxiproxy-cli -h localhost:6666 toxic update -n latency_upstream -a latency=50000 bolt_core_X
HTTP API:
curl -X DELETE localhost:6666/proxies/bolt_core_X/toxics/latency_upstream
CLI:
toxiproxy-cli -h localhost:6666 toxic delete -n latency_upstream bolt_core_X
HTTP API:
curl -X POST localhost:6666/reset