GET
The GET method is a read method that gets the resource specified by the URI. Data is returned in JSON format in the response body.
Example
The below example fetches configuration attributes for each VLAN with a depth=2
and selector=configuration
curl -X GET "https://<switch-ip>/rest/v10.13/system/vlans?depth=2&selector=configuration" -H "accept: application/json" -H "x-csrf-token: <csrf-token>"
{
"1": {
"aclmac_in_cfg": null,
"aclmac_in_cfg_version": null,
"aclv4_in_cfg": null,
"aclv4_in_cfg_version": null,
"aclv4_out_cfg": null,
"aclv4_out_cfg_version": null,
"aclv6_in_cfg": null,
"aclv6_in_cfg_version": null,
"aclv6_out_cfg": null,
"aclv6_out_cfg_version": null,
"delete_macs_requested": {},
"mgmd_enable": {},
"mgmd_igmp_block_ports": {},
"mgmd_igmp_fastleave_ports": {},
"mgmd_igmp_forcedfastleave_ports": {},
"mgmd_igmp_forward_ports": {},
"mgmd_igmp_static_groups": [],
"mgmd_igmp_version": null,
"mgmd_mld_block_ports": {},
"mgmd_mld_fastleave_ports": {},
"mgmd_mld_forcedfastleave_ports": {},
"mgmd_mld_forward_ports": {},
"mgmd_mld_static_groups": [],
"mgmd_mld_version": null,
"mgmd_snooping_acl": {},
"policy_in_cfg": null,
"policy_in_cfg_version": null,
"static_macs": "/rest/v10.13/system/vlans/1/static_macs",
"vsx_sync": []
},
"20": {
"aclmac_in_cfg": null,
"aclmac_in_cfg_version": null,
"aclv4_in_cfg": null,
"aclv4_in_cfg_version": null,
"aclv4_out_cfg": null,
"aclv4_out_cfg_version": null,
"aclv6_in_cfg": null,
"aclv6_in_cfg_version": null,
"aclv6_out_cfg": null,
"aclv6_out_cfg_version": null,
"admin": "up",
"delete_macs_requested": {},
"description": null,
"id": 20,
"mgmd_enable": {},
"mgmd_igmp_block_ports": {},
"mgmd_igmp_fastleave_ports": {},
"mgmd_igmp_forcedfastleave_ports": {},
"mgmd_igmp_forward_ports": {},
"mgmd_igmp_static_groups": [],
"mgmd_igmp_version": null,
"mgmd_mld_block_ports": {},
"mgmd_mld_fastleave_ports": {},
"mgmd_mld_forcedfastleave_ports": {},
"mgmd_mld_forward_ports": {},
"mgmd_mld_static_groups": [],
"mgmd_mld_version": null,
"mgmd_snooping_acl": {},
"name": "terraform_vlan",
"policy_in_cfg": null,
"policy_in_cfg_version": null,
"static_macs": "/rest/v10.13/system/vlans/20/static_macs",
"type": "static",
"voice": false,
"vsx_sync": []
},
"100": {
"aclmac_in_cfg": null,
"aclmac_in_cfg_version": null,
"aclv4_in_cfg": null,
"aclv4_in_cfg_version": null,
"aclv4_out_cfg": null,
"aclv4_out_cfg_version": null,
"aclv6_in_cfg": null,
"aclv6_in_cfg_version": null,
"aclv6_out_cfg": null,
"aclv6_out_cfg_version": null,
"admin": "up",
"delete_macs_requested": {},
"description": null,
"id": 100,
"mgmd_enable": {},
"mgmd_igmp_block_ports": {},
"mgmd_igmp_fastleave_ports": {},
"mgmd_igmp_forcedfastleave_ports": {},
"mgmd_igmp_forward_ports": {},
"mgmd_igmp_static_groups": [],
"mgmd_igmp_version": null,
"mgmd_mld_block_ports": {},
"mgmd_mld_fastleave_ports": {},
"mgmd_mld_forcedfastleave_ports": {},
"mgmd_mld_forward_ports": {},
"mgmd_mld_static_groups": [],
"mgmd_mld_version": null,
"mgmd_snooping_acl": {},
"name": "GO_TEST_VLAN",
"policy_in_cfg": null,
"policy_in_cfg_version": null,
"static_macs": "/rest/v10.13/system/vlans/100/static_macs",
"type": "static",
"voice": false,
"vsx_sync": []
},
"255": {
"aclmac_in_cfg": null,
"aclmac_in_cfg_version": null,
"aclv4_in_cfg": null,
"aclv4_in_cfg_version": null,
"aclv4_out_cfg": null,
"aclv4_out_cfg_version": null,
"aclv6_in_cfg": null,
"aclv6_in_cfg_version": null,
"aclv6_out_cfg": null,
"aclv6_out_cfg_version": null,
"admin": "up",
"delete_macs_requested": {},
"description": null,
"id": 255,
"mgmd_enable": {},
"mgmd_igmp_block_ports": {},
"mgmd_igmp_fastleave_ports": {},
"mgmd_igmp_forcedfastleave_ports": {},
"mgmd_igmp_forward_ports": {},
"mgmd_igmp_static_groups": [],
"mgmd_igmp_version": null,
"mgmd_mld_block_ports": {},
"mgmd_mld_fastleave_ports": {},
"mgmd_mld_forcedfastleave_ports": {},
"mgmd_mld_forward_ports": {},
"mgmd_mld_static_groups": [],
"mgmd_mld_version": null,
"mgmd_snooping_acl": {},
"name": "VLAN255",
"policy_in_cfg": null,
"policy_in_cfg_version": null,
"static_macs": "/rest/v10.13/system/vlans/255/static_macs",
"type": "static",
"voice": false,
"vsx_sync": []
},
"2020": {
"aclmac_in_cfg": null,
"aclmac_in_cfg_version": null,
"aclv4_in_cfg": null,
"aclv4_in_cfg_version": null,
"aclv4_out_cfg": null,
"aclv4_out_cfg_version": null,
"aclv6_in_cfg": null,
"aclv6_in_cfg_version": null,
"aclv6_out_cfg": null,
"aclv6_out_cfg_version": null,
"admin": "up",
"delete_macs_requested": {},
"description": null,
"id": 2020,
"mgmd_enable": {},
"mgmd_igmp_block_ports": {},
"mgmd_igmp_fastleave_ports": {},
"mgmd_igmp_forcedfastleave_ports": {},
"mgmd_igmp_forward_ports": {},
"mgmd_igmp_static_groups": [],
"mgmd_igmp_version": null,
"mgmd_mld_block_ports": {},
"mgmd_mld_fastleave_ports": {},
"mgmd_mld_forcedfastleave_ports": {},
"mgmd_mld_forward_ports": {},
"mgmd_mld_static_groups": [],
"mgmd_mld_version": null,
"mgmd_snooping_acl": {},
"name": "VLAN2020",
"policy_in_cfg": null,
"policy_in_cfg_version": null,
"static_macs": "/rest/v10.13/system/vlans/2020/static_macs",
"type": "static",
"voice": false,
"vsx_sync": []
}
}
Updated 4 months ago
What’s Next