Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Another example is a bandwidth test tool, which can be limited by providing run duration:

Code Block
languagetextpowershell
themeFadeToGrey
$ curl -k -u admin: -X POST 'POST https://router10.155.101.214/rest/tool/bandwidth-test' \
  --data '{"address":"10.0155.0101.1111","duration":10}"2s"}' \
  -H "content-type: application/json"
[{".section":"0","connection-count":"20","direction":"receive","lost-packets":"0","random-data":"false","rx-10-second-average":"0","rx-current":"0","rx-size":"1500","rx-total-average":"0","status":"connecting"},{".section":"1","connection-count":"20","direction":"receive","duration":"1s","lost-packets":"0","random-data":"false","rx-10-second-average":"0","rx-current":"0","rx-size":"1500","rx-total-average":"0","status":"running"},{".section":"2","connection-count":"20","direction":"receive","duration":"2s","lost-packets":"581175","random-data":"false","rx-10-second-average":"854372352","rx-current":"854372352","rx-size":"1500","rx-total-average":"854372352","status":"running"},{".section":"3","connection-count":"20","direction":"receive","duration":"3s","lost-packets":"9014","random-data":"false","rx-10-second-average":"891979008","rx-current":"929585664","rx-size":"1500","rx-total-average":"891979008","status":"done testing"}]



Errors

The success or failure of the API calls is indicated in the HTTP status code. In case of failure (status code 400 or larger), the body of the response contains a JSON object with the error code, a description of the error, and optional error details. For example, trying to delete an interface will return

...