Interface Groups API
Created Mar 27, 2024 at 07:12 PM

Overview

Overview

The documentation pages in this section describe the RESTful APIs included with Riverbed NetProfiler Product. It is assumed that the reader has practical knowledge of RESTful APIs, so the documentation does not go into detail about what REST is and how to use it. Instead the documentation focuses on how to create and manage interface groups.

Interface groups are maintained in a hierarchical form and are identified by their group path, similar to files in a Linux file system. Each interface group can contain interfaces, devices and interface sub-groups within itself.

The following operations can be performed via the API:

  • Create new interface groups
  • Fetch details on existing interface groups
  • Update existing interface groups
  • Delete existing interface groups
  • Add interfaces, devices and interface sub-groups to existing interface groups
  • Delete interfaces, devices and interface sub-groups from existing interface groups
  • Import interface groups from XML
  • Export interface groups to XML

Details about REST resources can be found in the Resources section. This overview continues with how to run these APIs.

Authentication

All REST requests must be authenticated. The Authentication section of the Common API describes which authentication methods are presently supported.

Resources

Interface Groups: Get Groups

Get all interface groups

GET https://{device}/api/mgmt.interface_groups/1.0/groups/all
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
[
  {
    "name": string,
    "description": string,
    "group_path": string,
    "parent_group_path": string,
    "member_type": string,
    "members": [
      {
      }
    ]
  }
]

Example:
[
  {
    "name": "WAN", 
    "description": "All WAN interfaces known to Profiler, both optimized and non-optimized", 
    "members": [
      {
        "name": "Non-optimized", 
        "description": "WAN interfaces of non-optimizing WAN devices", 
        "members": [], 
        "group_path": "/WAN/Non-optimized", 
        "parent_group_path": "/WAN", 
        "member_type": "Interface Group"
      }, 
      {
        "name": "Optimized", 
        "description": "WAN interfaces of Steelhead and other WAN optimization devices", 
        "members": [], 
        "group_path": "/WAN/Optimized", 
        "parent_group_path": "/WAN", 
        "member_type": "Interface Group"
      }
    ], 
    "group_path": "/WAN", 
    "parent_group_path": "/", 
    "member_type": "Interface Group"
  }, 
  {
    "name": "Deployment", 
    "description": "Layout of deployed Cascade data flow products", 
    "members": [
      {
        "ipaddr": "10.1.102.23", 
        "member_type": "Device", 
        "device_type": "Cascade Gateway Virtual Edition", 
        "version": "M19.0", 
        "interface": []
      }
    ], 
    "group_path": "/Deployment", 
    "parent_group_path": "/", 
    "member_type": "Interface Group"
  }, 
  {
    "name": "dummy1", 
    "description": "Dummy 1", 
    "members": [
      {
        "ipaddr": "10.33.131.198", 
        "ifindex": "1", 
        "member_type": "Interface"
      }, 
      {
        "ipaddr": "10.33.131.198", 
        "ifindex": "2", 
        "member_type": "Interface"
      }, 
      {
        "ipaddr": "10.1.11.175", 
        "member_type": "Device", 
        "device_type": "Riverbed SteelFlow", 
        "version": "CascadeFlow", 
        "interface": [
          {
            "ipaddr": "10.1.11.175", 
            "ifindex": "2"
          }
        ]
      }, 
      {
        "ipaddr": "10.44.112.7", 
        "member_type": "Device", 
        "device_type": "SteelCentral AWS VPC Flow Exporter", 
        "version": "1.0", 
        "interface": [
          {
            "ipaddr": "10.44.112.7", 
            "ifindex": "1"
          }
        ]
      }, 
      {
        "ipaddr": "40.71.236.158", 
        "member_type": "Device", 
        "device_type": "SteelCentral Azure NSG Flow Exporter", 
        "version": "1.1", 
        "interface": [
          {
            "ipaddr": "40.71.236.158", 
            "ifindex": "1", 
            "label": "40.71.236.158:AZURE_NSG_Flow"
          }
        ]
      }, 
      {
        "ipaddr": "177.217.207.71", 
        "member_type": "Device", 
        "device_type": "NetFlow", 
        "version": "9", 
        "interface": [
          {
            "ipaddr": "177.217.207.71", 
            "ifindex": "271", 
            "label": "71.207.217.177.isp.timbrasil.com.br:271"
          }, 
          {
            "ipaddr": "177.217.207.71", 
            "ifindex": "2571", 
            "label": "71.207.217.177.isp.timbrasil.com.br:2571"
          }
        ]
      }, 
      {
        "name": "WAN", 
        "description": "All WAN interfaces known to Profiler, both optimized and non-optimized", 
        "members": [
          {
            "name": "Non-optimized", 
            "description": "WAN interfaces of non-optimizing WAN devices", 
            "members": [], 
            "group_path": "/dummy1/WAN/Non-optimized", 
            "parent_group_path": "/dummy1/WAN", 
            "member_type": "Interface Group"
          }, 
          {
            "name": "Optimized", 
            "description": "WAN interfaces of Steelhead and other WAN optimization devices", 
            "members": [], 
            "group_path": "/dummy1/WAN/Optimized", 
            "parent_group_path": "/dummy1/WAN", 
            "member_type": "Interface Group"
          }
        ], 
        "group_path": "/dummy1/WAN", 
        "parent_group_path": "/dummy1", 
        "member_type": "Interface Group"
      }
    ], 
    "group_path": "/dummy1", 
    "parent_group_path": "/", 
    "member_type": "Interface Group"
  }
]
Property Name Type Description Notes
GetGroups <array of <object>> Interface groups data
GetGroups[item] <object> Interface group data
GetGroups[item].name <string> Group name
GetGroups[item].description <string> Group description
GetGroups[item].group_path <string> Group path
GetGroups[item].parent_group_path <string> Parent group path
GetGroups[item].member_type <string> Type of member Values: Interface Group, Device, Interface
GetGroups[item].members <array of <object>> List of all sub-groups and member devices and interfaces
GetGroups[item].members[item] <object> Sub-group / device / interface data Optional

Interface Groups: Get Group

Get an interface group

GET https://{device}/api/mgmt.interface_groups/1.0/groups
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
{
  "group_path": string
}

Example:
{
  "group_path": "/mygroup1/mygroup2"
}
Property Name Type Description Notes
GetGroupRequest <object> Group identifier
GetGroupRequest.group_path <string> Group path
Response Body

On success, the server returns a response body with the following structure:

  • JSON
{
  "name": string,
  "description": string,
  "group_path": string,
  "parent_group_path": string,
  "member_type": string,
  "members": [
    {
    }
  ]
}

Example:
{
  "name": "mygroup2", 
  "description": "My Group 2", 
  "members": [
    {
      "ipaddr": "10.33.131.198", 
      "ifindex": "1", 
      "member_type": "Interface"
    }, 
    {
      "ipaddr": "10.33.131.198", 
      "ifindex": "2", 
      "member_type": "Interface"
    }, 
    {
      "ipaddr": "10.1.11.175", 
      "member_type": "Device", 
      "device_type": "Riverbed SteelFlow", 
      "version": "CascadeFlow", 
      "interface": [
        {
          "ipaddr": "10.1.11.175", 
          "ifindex": "2"
        }
      ]
    }, 
    {
      "ipaddr": "10.44.112.7", 
      "member_type": "Device", 
      "device_type": "SteelCentral AWS VPC Flow Exporter", 
      "version": "1.0", 
      "interface": [
        {
          "ipaddr": "10.44.112.7", 
          "ifindex": "1"
        }
      ]
    }, 
    {
      "ipaddr": "40.71.236.158", 
      "member_type": "Device", 
      "device_type": "SteelCentral Azure NSG Flow Exporter", 
      "version": "1.1", 
      "interface": [
        {
          "ipaddr": "40.71.236.158", 
          "ifindex": "1", 
          "label": "40.71.236.158:AZURE_NSG_Flow"
        }
      ]
    }, 
    {
      "ipaddr": "177.217.207.71", 
      "member_type": "Device", 
      "device_type": "NetFlow", 
      "version": "9", 
      "interface": [
        {
          "ipaddr": "177.217.207.71", 
          "ifindex": "271", 
          "label": "71.207.217.177.isp.timbrasil.com.br:271"
        }, 
        {
          "ipaddr": "177.217.207.71", 
          "ifindex": "2571", 
          "label": "71.207.217.177.isp.timbrasil.com.br:2571"
        }
      ]
    }, 
    {
      "name": "WAN", 
      "description": "All WAN interfaces known to Profiler, both optimized and non-optimized", 
      "members": [
        {
          "name": "Non-optimized", 
          "description": "WAN interfaces of non-optimizing WAN devices", 
          "members": [], 
          "group_path": "/mygroup1/mygroup2/WAN/Non-optimized", 
          "parent_group_path": "/mygroup1/mygroup2/WAN", 
          "member_type": "Interface Group"
        }, 
        {
          "name": "Optimized", 
          "description": "WAN interfaces of Steelhead and other WAN optimization devices", 
          "members": [], 
          "group_path": "/mygroup1/mygroup2/WAN/Optimized", 
          "parent_group_path": "/mygroup1/mygroup2/WAN", 
          "member_type": "Interface Group"
        }
      ], 
      "group_path": "/mygroup1/mygroup2/WAN", 
      "parent_group_path": "/mygroup1/mygroup2", 
      "member_type": "Interface Group"
    }
  ], 
  "group_path": "/mygroup1/mygroup2", 
  "parent_group_path": "/mygroup1", 
  "member_type": "Interface Group"
}
Property Name Type Description Notes
GetGroupResponse <object> Interface group data
GetGroupResponse.name <string> Group name
GetGroupResponse.description <string> Group description
GetGroupResponse.group_path <string> Group path
GetGroupResponse.parent_group_path <string> Parent group path
GetGroupResponse.member_type <string> Type of member Values: Interface Group, Device, Interface
GetGroupResponse.members <array of <object>> List of all sub-groups and member devices and interfaces
GetGroupResponse.members[item] <object> Sub-group / device / interface data Optional

Interface Groups: Create Group

Create a new interface group

POST https://{device}/api/mgmt.interface_groups/1.0/groups
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
{
  "name": string,
  "description": string,
  "parent_group_path": string
}

Example:
{
  "name": "test3", 
  "description": "Test 3", 
  "parent_group_path": "/test1/test2"
}
Property Name Type Description Notes
CreateGroup <object> Group data
CreateGroup.name <string> Group name
CreateGroup.description <string> Group description
CreateGroup.parent_group_path <string> Parent group path. If not specified, group will be created at the top level Optional; Default is /
Response Body

On success, the server does not provide any body in the responses.

Interface Groups: Update Group

Update an interface group

PUT https://{device}/api/mgmt.interface_groups/1.0/groups
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
{
  "group_path": string,
  "name": string,
  "description": string
}

Example:
{
  "group_path": "/test1/test2", 
  "name": "test2new", 
  "description": "Test 2 new"
}
Property Name Type Description Notes
UpdateGroup <object> Group data
UpdateGroup.group_path <string> Current group path
UpdateGroup.name <string> New group name. If no change, then same as old name.
UpdateGroup.description <string> New group description Optional
Response Body

On success, the server does not provide any body in the responses.

Interface Groups: Delete Groups

Delete multiple interface groups

DELETE https://{device}/api/mgmt.interface_groups/1.0/groups
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
{
  "group_paths": [
    string
  ]
}

Example:
{
  "group_paths": [
    "/test1/test2/test3/test4", 
    "/dummy1/dummy2"
  ]
}
Property Name Type Description Notes
DeleteGroups <object> Group identifiers
DeleteGroups.group_paths <array of <string>> List of group paths
DeleteGroups.group_paths[item] <string> Group path
Response Body

On success, the server does not provide any body in the responses.

Interface Groups: Import Groups

Import interface groups from XML data

POST https://{device}/api/mgmt.interface_groups/1.0/groups/import
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
{
  "parent_group_path": string,
  "xml_data": string,
  "replace": boolean
}

Example:
{
  "parent_group_path": "/dummy1", 
  "xml_data": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<network_grouping version=\"1\">\r\n <network_group>\r\n  <name>dummy1</name>\r\n  <description>Dummy 1</description>\r\n  <members>\r\n   <device ipaddr=\"10.1.11.175\" type=\"Riverbed SteelFlow\" version=\"CascadeFlow\" >\r\n     <interface ipaddr=\"10.1.11.175\" ifindex=\"2\" />\r\n   </device>\r\n   <interface ipaddr=\"10.33.131.198\" ifindex=\"1\" />\r\n   <interface ipaddr=\"10.33.131.198\" ifindex=\"2\" />\r\n  </members>\r\n </network_group>\r\n</network_grouping>", 
  "replace": true
}
Property Name Type Description Notes
ImportGroups <object> Import data
ImportGroups.parent_group_path <string> Parent group path. If not specified, data will be imported at the top level. Optional; Default is /
ImportGroups.xml_data <string> XML data to be imported, formatted as a string. Use the XML data (as string) obtained from the export API.
ImportGroups.replace <boolean> If set, replace the existing members of the group. Else, default is to merge with the existing members. Optional
Response Body

On success, the server does not provide any body in the responses.

Interface Groups: Export Groups

Export interface groups in XML

GET https://{device}/api/mgmt.interface_groups/1.0/groups/export
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
{
  "group_path": string
}

Example:
{
  "group_path": "/dummy1"
}
Property Name Type Description Notes
ExportGroupsRequest <object> Group identifier for data to be exported
ExportGroupsRequest.group_path <string> Group path. If not specified, data for all groups will be exported. Optional; Default is /
Response Body

On success, the server returns a response body with the following structure:

  • JSON
{
  "group_path": string,
  "xml_data": string
}

Example:
{
  "group_path": "/dummy1", 
  "xml_data": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<network_grouping version=\"1\">\r\n <network_group>\r\n  <name>dummy1</name>\r\n  <description>Dummy 1</description>\r\n  <members>\r\n   <device ipaddr=\"10.1.11.175\" type=\"Riverbed SteelFlow\" version=\"CascadeFlow\" >\r\n     <interface ipaddr=\"10.1.11.175\" ifindex=\"2\" />\r\n   </device>\r\n   <interface ipaddr=\"10.33.131.198\" ifindex=\"1\" />\r\n   <interface ipaddr=\"10.33.131.198\" ifindex=\"2\" />\r\n  </members>\r\n </network_group>\r\n</network_grouping>"
}
Property Name Type Description Notes
ExportGroupsResponse <object> Exported data
ExportGroupsResponse.group_path <string> Group path
ExportGroupsResponse.xml_data <string> Exported XML data, formatted as a string. Use this in the request body for the import API.

Interface Group Members: Add Members

Add devices and/or interfaces to an interface group

POST https://{device}/api/mgmt.interface_groups/1.0/members
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
{
  "group_path": string,
  "members": [
    string
  ]
}

Example:
{
  "group_path": "/test1/test2/test3/test4", 
  "members": [
    "10.1.11.175", 
    "10.1.124.247", 
    "10.33.131.198:1", 
    "10.33.131.198:2"
  ]
}
Property Name Type Description Notes
AddMembers <object> Member details and parent group identifier
AddMembers.group_path <string> Parent group path
AddMembers.members <array of <string>> List of member devices and interfaces
AddMembers.members[item] <string> Member identifier
Response Body

On success, the server does not provide any body in the responses.

Interface Group Members: Delete Members

Delete devices and/or interfaces from an interface group

DELETE https://{device}/api/mgmt.interface_groups/1.0/members
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
{
  "group_path": string,
  "members": [
    string
  ]
}

Example:
{
  "group_path": "/test1/test2/test3/test4", 
  "members": [
    "10.1.11.175", 
    "10.1.124.247", 
    "10.33.131.198:1", 
    "10.33.131.198:2"
  ]
}
Property Name Type Description Notes
DeleteMembers <object> Member details and parent group identifier
DeleteMembers.group_path <string> Parent group path
DeleteMembers.members <array of <string>> List of member devices and interfaces
DeleteMembers.members[item] <string> Member identifier
Response Body

On success, the server does not provide any body in the responses.

Error Codes

In the event that an error occurs while processing a request, the server will respond with appropriate HTTP status code and additional information in the response body:

{
     "error_id":   "{error identifier}",
     "error_text": "{error description}",
     "error_info": {error specific data structure, optional}
}

The table below lists the possible errors and the associated HTTP status codes that may returned.

Error ID HTTP Status Comments
BAD REQUEST 400 Invalid argument
UNAUTHORIZED 401 Authentication failed
FORBIDDEN 403 No permission to access the requested resource
NOT FOUND 404 Content not found
METHOD NOT ALLOWED 405 Method not supported for the requested resource
INTERNAL SERVER ERROR 500 Internal server error
SERVICE UNAVAILABLE 503 Service is currently unavailable