1
General Discussion / Assistance with Adding a trafficshaper through Rest API
« on: March 08, 2019, 06:08:23 pm »
Hi All,
I have been trying to find the correct format for the trafficshaper APIs. The only result I ever get is "failed" which is basically any validation failure. Trying to parse through the code and haven't had any luck getting the right combination. As anyone added pipes, queues, and rules via Rest?
An example of one of my attempts:
curl -v -XPOST -d '{"number":"100","enabled":"1","bandwidth":"300","bandwidthMetric":"Kbit","mask":"none","codel_enable":"0","codel_ecn_enable":"0","pie_enable":"0","description":"TestPipe"}' -H "Content-Type: application/json" -k -u "<Key>":"<secret>" https://192.168.1.1/api/trafficshaper/settings/addpipe
{"result":"failed"}
I have been trying to find the correct format for the trafficshaper APIs. The only result I ever get is "failed" which is basically any validation failure. Trying to parse through the code and haven't had any luck getting the right combination. As anyone added pipes, queues, and rules via Rest?
An example of one of my attempts:
curl -v -XPOST -d '{"number":"100","enabled":"1","bandwidth":"300","bandwidthMetric":"Kbit","mask":"none","codel_enable":"0","codel_ecn_enable":"0","pie_enable":"0","description":"TestPipe"}' -H "Content-Type: application/json" -k -u "<Key>":"<secret>" https://192.168.1.1/api/trafficshaper/settings/addpipe
{"result":"failed"}