Courseiva
AutomationhardMultiple ChoiceObjective-mapped

350-601 Automation Practice Question

Exhibit

GET /ins HTTP/1.1\nHost: 10.1.1.1\nContent-Type: application/json\n\n{\n  "ins_api": {\n    "version": "1.0",\n    "type": "cli_show",\n    "chunk": "0",\n    "sid": "1",\n    "input": "show interface eth1/1"\n  }\n}\n\nResponse:\n{\n  "ins_api": {\n    "outputs": {\n      "output": {\n        "msg": "Success",\n        "code": "200",\n        "input": "show interface eth1/1",\n        "body": {
          "TABLE_interface": { ... },
          "ROW_interface": { "interface": "Ethernet1/1", "state": "up" }
        }\n      }\n    }\n  }\n}

Refer to the exhibit. A Python script is processing the response from NX-API. It attempts to extract the interface state using `response['ins_api']['outputs']['output']['body']['ROW_interface']['state']` but receives a KeyError. What is the most likely reason?

⚠ Common exam trap

Many exam-takers assume the JSON path directly mirrors the CLI output structure, forgetting that NX-API wraps tabular data in an intermediate 'TABLE_' key that must be included in the dictionary traversal.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The JSON structure has an extra level 'TABLE_interface' before 'ROW_interface'.

The NX-API response for interface commands includes a 'TABLE_interface' key that wraps the 'ROW_interface' key. The script attempts to access 'ROW_interface' directly under 'body', but the correct path is `response['ins_api']['outputs']['output']['body']['TABLE_interface']['ROW_interface']['state']`. Option B correctly identifies this missing intermediate level.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The 'output' key is a list, not a dictionary.

    Why it's wrong here

    In this response 'output' appears as a single object, not a list.

  • The JSON structure has an extra level 'TABLE_interface' before 'ROW_interface'.

    Why this is correct

    Some NX-API outputs wrap rows in a table key; the script missed that level.

  • The 'ins_api' key is nested inside another object.

    Why it's wrong here

    The top-level key is 'ins_api' as shown.

  • The 'body' key is missing because the command failed.

    Why it's wrong here

    The response shows 'Success' and body is present.

About these practice questions

Courseiva writes every 350-601 question from scratch — 984 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 350-601 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 350-601 exam.