Hey! These docs are for version 6.3, which is no longer officially supported. Click here for the latest version, 6.7!

Rest API Config endpoint for netflow sources (NetAudit module users only)

Object type: netflow_source

Request URL: /rest/config/netflow_source

Example GET

{
   "list" : [
      {
         "active" : "0",
         "collector_id" : "1",
         "host_id" : "7",
         "id" : "1",
         "port" : "5454",
         "ref" : "/rest/config/netflowsource/1",
         "uncommitted" : "0"
      },
      {
         "active" : "1",
         "collector_id" : "1",
         "host_id" : "9",
         "id" : "3",
         "port" : "5455",
         "ref" : "/rest/config/netflowsource/3",
         "uncommitted" : "0"
      },
      {
         "active" : "1",
         "collector_id" : "2",
         "host_id" : "11",
         "id" : "5",
         "port" : "5454",
         "ref" : "/rest/config/netflowsource/5",
         "uncommitted" : "0"
      },
      {
         "active" : "1",
         "collector_id" : "1",
         "host_id" : "13",
         "id" : "9",
         "port" : "123",
         "ref" : "/rest/config/netflowsource/9",
         "uncommitted" : "0"
      }
   ],
   "summary" : {
      "allrows" : "4",
      "page" : "1",
      "rows" : "4",
      "totalpages" : "1",
      "totalrows" : "4"
   }
}

Example GET single node

Request URL: /rest/config/netflow_source/5

{
   "object" : {
      "active" : "1",
      "collector_id" : "2",
      "host_id" : "11",
      "id" : "5",
      "port" : "5454",
      "uncommitted" : "0"
   }
}

Example PUT

NOTE: Only the active state (boolean) can be changed for an existing source.

Request URL: /rest/config/netflow_source/1

Request data:

{
   "object" : {
      "active" : "1",
      "collector_id" : "1",
      "host_id" : "7",
      "port" : "5454",
   }
}

Response:

{
   "object" : {
      "active" : "1",
      "collector_id" : "1",
      "host_id" : "7",
      "id" : "1",
      "port" : "5454",
      "uncommitted" : "1"
   }
}

Example POST

Request URL: /rest/config/netflow_source

Request data:

{
   "object" : {
      "active" : "1",
      "collector_id" : "2",
      "host_id" : "12",
      "port" : "1234",
   }
}

Response:

{
   "object" : {
      "active" : "1",
      "collector_id" : "2",
      "host_id" : "12",
      "id" : "10",
      "port" : "1234",
      "uncommitted" : "1"
   }
}

Example DELETE

Request URL: /rest/config/netflow_source/5

Response:

{
   "success" : "1"
}