Difference between revisions of "Traffic Groups Using The API"

From Observer GigaFlow Support | VIAVI Solutions Inc.
Jump to: navigation, search

Revision as of 11:50, 30 January 2019

It is possible to provision and remove Traffic Groups from the GigaFlow server via the rest API using the following requests

Below will add a new TrafficGroup called "Office_2" with no description, a starting IP of and an ending ip of "", it will also set the group to only accept flows from the 3 listed devices"

{"action":"get","type":"addtrafficgroup","groups":[{"name":"Office 7_2","description":"","startip":"","endip":"","devices":["","",""]}]}

If you do not want to assign any devices, you can skip that parameter completely

{"action":"get","type":"addtrafficgroup","groups":[{"name":"Office 7_2","description":"","startip":"","endip":""}]}

Note, if a traffic group already exists, you can only add devices to it, you can't make any other changes. If you need to change a traffic group, remove and then re-add it with the correct settings.

To remove a traffic group, use the following request (which will delete the 2 listed groups)



curl -H "Content-Type: application/json" -X POST -d '{"action":"get","type":"addtrafficgroup","groups":[{"name":"Office 7_2","description":"","startip":"","endip":""}]}' ""
curl -H "Content-Type: application/json" -X POST -d '{"action":"get","type":"addtrafficgroup","groups":[{"name":"test1","description":"","startip":"","endip":"","devices":["",""]},{"name":"test2","description":"test2 desc","startip":"","endip":""}]}' ""
curl -H "Content-Type: application/json" -X POST -d '{"action":"get","type":"removetrafficgroup","groups":["test1"]}' ""
curl -H "Content-Type: application/json" -X POST -d '{"action":"get","type":"removetrafficgroup","groups":["test1","test2"]}' ""