Examples: GET method

Instructions and examples in this document use an IP address that is reserved for documentation, 192.0.2.5, as an example of the IP address for the switch. To access your switch, you must use the IP address or hostname of that switch.

  • Get the list of all VLANS:

    GET "https://192.0.2.5/rest/v10.04/system/vlans"
  • Expand the list of URIs in the vlans collection by one level, which replaces the URI for the VLAN with the JSON data for that VLAN.

    GET "https://192.0.2.5/rest/v10.04/system/vlans?depth=2"
  • Get the administrative state of interface 1/1/3:

    https://192.0.2.5/rest/v10.04/system/interfaces/1%2F1%2F3?attributes=admin
  • Use the attributes parameter to get all interfaces but show only the attributes name and ipv4_address:

    GET "https://192.0.2.5/rest/v10.04/system/interfaces?attributes=name,ipv4_address"
  • Use the selector parameter to get all the writable configuration attributes of VLAN 100:

    GET "https://192.0.2.5/rest/v10.04/system/vlans/100?selector=writable"
  • Use the selector parameter to get all the system attributes that are in the categories configuration and status:

    GET "https://192.0.2.5/rest/v10.04/system?selector=category,status"