Interpreting JSON Encoded Data
22 soru
A network automation engineer issues an HTTP GET request to a Cisco IOS-XE RESTCONF API endpoint to retrieve BGP neighbor status details. The router returns the following JSON-encoded response:
{
"Cisco-IOS-XE-bgp:bgp-state-data": {
"bgp-neighbors": [
{
"neighbor-id": "192.168.10.1",
"remote-as": 65001,
"state": "Established",
"address-family": [
{
"af-name": "ipv4-unicast",
"prefixes": {
"accepted": 42,
"sent": 15
}
},
{
"af-name": "vpnv4-unicast",
"prefixes": {
"accepted": 120,
"sent": 88
}
}
]
},
{
"neighbor-id": "192.168.20.2",
"remote-as": 65002,
"state": "Active",
"address-family": [
{
"af-name": "ipv4-unicast",
"prefixes": {
"accepted": 0,
"sent": 0
}
}
]
}
]
}
}
Match each Python dictionary lookup / data extraction expression on the left to its corresponding value or evaluated data type on the right based on the JSON response payload.
Soldaki öğeye tıklayın, sonra eşleşen sağdaki öğeye tıklayın
Öğeler
Eşleşmeler
A network automation engineer sends an HTTP GET request to a Cisco IOS XE RESTCONF endpoint to check IP SLA operation status. The API returns the following JSON payload:
{
"Cisco-IOS-XE-sla:sla": {
"ip-sla": [
{
"oper-id": 101,
"type": "icmp-echo",
"destination": "192.168.50.1",
"stats": {
"rtt-ms": 14,
"state": "active",
"history": [
{"sample-id": 1, "rtt": 12, "success": true},
{"sample-id": 2, "rtt": 16, "success": true}
]
}
},
{
"oper-id": 102,
"type": "udp-jitter",
"destination": "10.10.20.5",
"stats": {
"rtt-ms": 4,
"state": "inactive",
"history": [
{"sample-id": 1, "rtt": 4, "success": false}
]
}
}
]
}
}
Based on the JSON payload provided above, match each data extraction path on the left to its correct extracted value and data type on the right.
Soldaki öğeye tıklayın, sonra eşleşen sağdaki öğeye tıklayın
Öğeler
Eşleşmeler
An automation script executes an HTTP GET request to a Cisco RESTCONF API endpoint. The router responds with the following JSON payload:
{
"ietf-interfaces:interface": {
"name": "GigabitEthernet1",
"description": "Uplink to Core",
"type": "iana-if-type:ethernetCsmacd",
"enabled": true,
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.1.1",
"netmask": "255.255.255.0"
}
]
}
}
}
What is the value of the "description" key in this interface configuration?
A network technician uses a REST API call to retrieve VLAN configuration data from a Cisco switch. The device returns the following JSON payload:
{
"response": {
"vlan_list": [
{
"vlan_id": 10,
"name": "Management",
"active": true
},
{
"vlan_id": 20,
"name": "Engineering",
"active": false
}
],
"total_vlans": 2
}
}
Based on this JSON payload, which of the following statements are correct? (Select TWO.)
Geçerli olan tümünü seçin
A network administrator receives the following JSON payload from a Cisco DNA Center REST API request:
{
"response": [
{
"hostname": "Switch-Core-01",
"managementIp": "10.1.10.1"
},
{
"hostname": "Switch-Access-01",
"managementIp": "10.1.20.15"
}
]
}
What is the value of `response[1]["managementIp"]` in this JSON structure?
A network automation script executes a REST API call to a Cisco SD-WAN vManage controller to retrieve operational statistics. The API returns the following JSON payload:
{
"system_status": {
"controller_group": "Group-Alpha",
"devices": [
{
"hostname": "vEdge-Branch1",
"site_id": 100,
"reachability": "reachable",
"tunnel_stats": [
{"color": "biz-internet", "latency_ms": 12},
{"color": "mpls", "latency_ms": 8}
]
},
{
"hostname": "vEdge-Branch2",
"site_id": 200,
"reachability": "unreachable",
"tunnel_stats": [
{"color": "biz-internet", "latency_ms": 45}
]
}
]
}
}
Assuming the response is stored in a Python dictionary named `payload`, which data path expression correctly extracts the integer value `8` representing the MPLS tunnel latency for `vEdge-Branch1`?
A network engineer performs an HTTP GET request to a Cisco IOS XE RESTCONF interface configuration endpoint. The server returns the following JSON payload:
{
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "GigabitEthernet0/0/0",
"type": "iana-if-type:ethernetCsmacd",
"enabled": "true",
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.10.1",
"netmask": "255.255.255.0"
}
]
}
},
{
"name": "GigabitEthernet0/0/1",
"type": "iana-if-type:ethernetCsmacd",
"enabled": false,
"ietf-ip:ipv4": {
"address": [
{
"ip": "10.0.1.1",
"netmask": "255.255.255.252"
}
]
}
}
]
}
}
Which TWO statements accurately interpret the structure and data types in this JSON payload?
Geçerli olan tümünü seçin
An automated Python monitoring script sends a RESTCONF HTTP GET request to a Cisco IOS XE router to inspect BGP peer relationships. The JSON response is parsed into a Python dictionary named `bgp_data` as shown below:
{
"Cisco-IOS-XE-bgp:bgp": {
"bgp": [
{
"asn": 65001,
"neighbor": [
{
"ip": "10.1.1.2",
"remote-as": 65002,
"state": "Established"
},
{
"ip": "10.2.2.2",
"remote-as": 65003,
"state": "Active"
}
]
}
]
}
}
Which Python expression correctly evaluates to the string `"Active"`?
A network engineer issues a RESTCONF GET request to a Cisco IOS XE router to inspect interface operational state data. The API returns the following JSON payload, which is parsed into a Python dictionary named `payload`:
{
"ietf-interfaces:interfaces-state": {
"interface": [
{
"name": "GigabitEthernet1",
"type": "iana-if-type:ethernetCsmacd",
"oper-status": "up",
"phys-address": "00:50:56:89:a1:b2",
"speed": 1000000000
},
{
"name": "GigabitEthernet2",
"type": "iana-if-type:ethernetCsmacd",
"oper-status": "down",
"phys-address": "00:50:56:89:a1:c3",
"speed": 100000000
}
]
}
}
Match each Python dictionary lookup expression on the left with its evaluated value on the right.
Soldaki öğeye tıklayın, sonra eşleşen sağdaki öğeye tıklayın
Öğeler
Eşleşmeler
A network technician parses telemetry data returned by a Cisco vManage REST API call stored in a Python dictionary variable named `telemetry_data`:
{
"header": {
"generated_at": 1690000000,
"status": "success"
},
"data": [
{
"device_id": "10.10.10.1",
"interfaces": [
{
"name": "GigabitEthernet1",
"rx_errors": 0,
"tx_errors": 12,
"status": "up"
},
{
"name": "GigabitEthernet2",
"rx_errors": 45,
"tx_errors": 3,
"status": "up"
}
]
},
{
"device_id": "10.10.10.2",
"interfaces": [
{
"name": "GigabitEthernet1",
"rx_errors": 108,
"tx_errors": 0,
"status": "down"
}
]
}
]
}
What specific value is extracted when referencing `telemetry_data["data"][1]["interfaces"][0]["rx_errors"]`?
A network administrator issues a RESTCONF HTTP GET request to retrieve OSPF interface parameters from a Cisco IOS XE router. The API returns the following JSON payload:
{
"Cisco-IOS-XE-ospf:ospf": {
"process": [
{
"id": 1,
"area": [
{
"area-id": 0,
"interface": [
{
"name": "GigabitEthernet1",
"cost": 10,
"passive": false
},
{
"name": "GigabitEthernet2",
"cost": 100,
"passive": true
}
]
}
]
}
]
}
}
Based on the JSON payload provided, which two statements correctly interpret the structural data and values? (Select two.)
Geçerli olan tümünü seçin
A network automation script issues a RESTCONF HTTP GET request to a Cisco IOS XE router to inspect interface configurations. The API returns the following JSON response payload stored in a Python dictionary variable named `result`:
{
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "Loopback0",
"description": "Router ID Interface",
"enabled": true,
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.255.1",
"netmask": "255.255.255.255"
}
]
}
},
{
"name": "GigabitEthernet0/0/0",
"description": "WAN Link",
"enabled": false,
"ietf-ip:ipv4": {
"address": [
{
"ip": "10.0.12.1",
"netmask": "255.255.255.252"
}
]
}
}
]
}
}
Which Python expression correctly retrieves the IP address string `"10.0.12.1"` from the `result` dictionary?
A network automation engineer issues a REST API call to a Cisco Catalyst 9800 Wireless LAN Controller to inspect access point operational telemetry. The controller returns the following JSON encoded response:
{
"response": {
"access_points": [
{
"name": "AP-Lobby-01",
"ip_address": "10.20.40.15",
"radios": [
{ "radio_id": 0, "band": "2.4GHz", "channel": 6, "admin_state": true },
{ "radio_id": 1, "band": "5GHz", "channel": 36, "admin_state": true }
]
},
{
"name": "AP-Conf-02",
"ip_address": "10.20.40.16",
"radios": [
{ "radio_id": 0, "band": "2.4GHz", "channel": 11, "admin_state": false },
{ "radio_id": 1, "band": "5GHz", "channel": 149, "admin_state": true }
]
}
]
}
}
Match each JSON data path expression on the left to its corresponding value on the right based on the returned JSON payload.
Soldaki öğeye tıklayın, sonra eşleşen sağdaki öğeye tıklayın
Öğeler
Eşleşmeler
An automation script retrieves the following JSON response payload from a Cisco Catalyst Center system health API endpoint and stores it in a Python dictionary variable named `health_data`:
{
"response": {
"overallHealth": 85,
"issueList": [
{
"issueId": "ISSUE-101",
"severity": "HIGH",
"impactedEntities": [
{"name": "GigabitEthernet1/0/1", "type": "Interface"},
{"name": "GigabitEthernet1/0/2", "type": "Interface"}
]
},
{
"issueId": "ISSUE-102",
"severity": "LOW",
"impactedEntities": [
{"name": "PowerSupply1", "type": "Power"}
]
}
]
}
}
Which two of the following statements regarding the structure and extraction of data from this JSON payload are correct?
Geçerli olan tümünü seçin
A network administrator parses a JSON response payload from a Cisco Catalyst Center API call stored in a Python dictionary variable named `inventory_data`:
{
"response": [
{
"hostname": "Core-SW-01",
"platformId": "C9300-48U",
"upTimeMinutes": 21600,
"stackMembers": ["Core-SW-01A", "Core-SW-01B"]
},
{
"hostname": "Dist-SW-01",
"platformId": "C9200-24P",
"upTimeMinutes": 61200,
"stackMembers": ["Dist-SW-01A"]
}
],
"version": "1.0"
}
Which Python expression correctly extracts the string value `'Core-SW-01B'` from the payload?
A Python script queries a Cisco Catalyst Center API endpoint for network device inventory and stores the resulting data structure in a variable named `data`. The JSON payload structure is shown below:
{
"response": {
"devices": [
{
"id": "dev-101",
"role": "DISTRIBUTION",
"mgmt_ip": "10.1.10.1"
},
{
"id": "dev-102",
"role": "ACCESS",
"mgmt_ip": "10.1.20.1"
}
],
"totalCount": 2
}
}
Which Python expression correctly extracts the management IP address of the ACCESS role device?
A network administrator executes a RESTCONF GET request to retrieve interface and OSPF routing configuration details from a Cisco router. The response payload is stored in a Python dictionary named `data` as shown below:
{
"ietf-interfaces:interface": {
"name": "GigabitEthernet0/0/1",
"description": "Uplink to Core",
"ietf-ip:ipv4": {
"address": [
{
"ip": "10.10.20.1",
"netmask": "255.255.255.0"
}
]
},
"Cisco-IOS-XE-ospf:ospf": {
"process-id": [
{
"id": 100,
"area": [
{
"area-id": "0.0.0.0",
"cost": 20
}
]
}
]
}
}
}
Match each Python expression on the left to the corresponding value extracted from the JSON structure on the right.
Soldaki öğeye tıklayın, sonra eşleşen sağdaki öğeye tıklayın
Öğeler
Eşleşmeler
A network engineer issues an API call to a Cisco Catalyst Center endpoint to query site health metrics. The API returns the following JSON response payload stored in a Python dictionary named `site_data`:
{
"response": [
{
"siteHierarchy": "Global/USA/SanJose/Building1",
"clientCount": 150,
"healthScore": [
{
"healthType": "OVERALL",
"score": 88
},
{
"healthType": "WIRELESS",
"score": 92
}
]
}
]
}
Which Python expression correctly extracts the numerical score for the WIRELESS health type from `site_data`?
A network administrator queries a Cisco vManage REST API endpoint to retrieve device interface operational details. The API returns the following JSON payload, which is parsed into a Python dictionary variable named `response_data`:
{
"header": {
"generated_at": 1774137600,
"status": 200
},
"data": [
{
"device_id": "10.10.10.1",
"host_name": "Edge-Router-1",
"interfaces": [
{
"name": "GigabitEthernet1",
"admin_status": "up",
"oper_status": "up",
"ip_address": "192.168.10.1",
"mtu": 1500
},
{
"name": "GigabitEthernet2",
"admin_status": "up",
"oper_status": "down",
"ip_address": "10.0.0.2",
"mtu": 1500
}
]
}
]
}
Which two statements regarding data extraction from this JSON payload are correct? (Select two.)
Geçerli olan tümünü seçin
An network engineer issues a REST API call to a Cisco DNA Center controller to retrieve information regarding managed network devices. The controller returns the following JSON response payload:
{
"response": [
{
"family": "Switches and Hubs",
"hostname": "Dist-Switch-01",
"managementIpAddress": "192.168.10.1",
"upTime": "12 days, 04:12:00",
"interfaceList": [
{
"portName": "GigabitEthernet1/0/1",
"vlan": 10,
"status": "up",
"speed": 1000
},
{
"portName": "GigabitEthernet1/0/2",
"vlan": 20,
"status": "down",
"speed": 1000
}
]
},
{
"family": "Routers",
"hostname": "Edge-Router-01",
"managementIpAddress": "10.1.1.1",
"upTime": "45 days, 11:05:22",
"interfaceList": [
{
"portName": "GigabitEthernet0/0/0",
"vlan": 1,
"status": "up",
"speed": 10000
}
]
}
],
"version": "1.0"
}
Assuming the variable `data` holds the parsed Python dictionary representation of this JSON payload, which Python expression correctly extracts the operating status (`"status"`) of the second interface on the distribution switch (`Dist-Switch-01`)?