Topic 22 Practice Test 1 covers REST APIs, Configuration Management, and JSON for Cisco Certified Network Associate 200-301 CCNA and maps to objectives 6.5-6.7. For broader exam preparation, review the Cisco CCNA 200-301 Exam Dumps. Every option includes focused technical reasoning explaining both the networking concept and its fit to the scenario.
Question 1
A design review for an operations portal reading a switch inventory focuses on one requirement: retrieve an existing resource without asking the API to create or remove it. Which choice is correct for this use case? Choose ONE.
- GET
- Content-Type: application/json
- POST
- DELETE
Correct Answer: A
Correct Answer
Answer A is correct because GET fits an operations portal reading a switch inventory. It reads an existing API resource. This is appropriate for retrieving current device or policy data. The scenario needs to read the addressed resource, so GET matches the operational evidence at an operations portal reading a switch inventory.
Incorrect Answers
Answer C is incorrect because POST submits data to create a resource. It is appropriate for creating a child or collection item. At an operations portal reading a switch inventory, the needed behavior is to read the addressed resource. That difference at an operations portal reading a switch inventory favors GET; POST solves another problem.
Answer D is incorrect because DELETE removes the addressed API resource. It is appropriate for deleting a known managed object. At an operations portal reading a switch inventory, the needed behavior is to read the addressed resource. That difference at an operations portal reading a switch inventory favors GET; DELETE solves another problem.
Answer B is incorrect because Content-Type: application/json labels the request body as JSON. It is appropriate for sending a JSON request payload. At an operations portal reading a switch inventory, the needed behavior is to read the addressed resource. That difference at an operations portal reading a switch inventory favors GET; Content-Type: application/json solves another problem.
Question 2
The evidence from a campus automation service creating a new site object shows that the selected mechanism must create or submit a new resource through a collection-style endpoint. Which choice is correct for this use case? Choose ONE.
- PUT
- POST
- An authorization token in the request
- A resource URI
Correct Answer: B
Correct Answer
Answer B is correct because POST fits a campus automation service creating a new site object. It submits data to create a resource. This is appropriate for creating a child or collection item. The scenario needs to create or submit new data, so POST matches the operational evidence at a campus automation service creating a new site object.
Incorrect Answers
Answer A is incorrect because PUT replaces data at a known URI. It is appropriate for updating a complete resource representation. At a campus automation service creating a new site object, the needed behavior is to create or submit new data. That difference at a campus automation service creating a new site object favors POST; PUT solves another problem.
Answer C is incorrect because An authorization token in the request carries accepted client authorization credentials. It is appropriate for calling a protected API endpoint. At a campus automation service creating a new site object, the needed behavior is to create or submit new data. That difference at a campus automation service creating a new site object favors POST; An authorization token in the request solves another problem.
Answer D is incorrect because A resource URI identifies the target API resource. It is appropriate for addressing one object or collection. At a campus automation service creating a new site object, the needed behavior is to create or submit new data. That difference at a campus automation service creating a new site object favors POST; A resource URI solves another problem.
Question 3
An engineer working on a controller client replacing the intended policy representation must replace or update the representation at a known resource URI. Which technology, method, or construct provides that behavior most directly? Choose ONE.
- Content-Type: application/json
- Create, Read, Update, Delete (CRUD)
- PUT
- DELETE
Correct Answer: C
Correct Answer
Answer C is correct because PUT fits a controller client replacing the intended policy representation. It replaces data at a known URI. This is appropriate for updating a complete resource representation. The scenario needs to replace the addressed resource, so PUT matches the operational evidence at a controller client replacing the intended policy representation.
Incorrect Answers
Answer D is incorrect because DELETE removes the addressed API resource. It is appropriate for deleting a known managed object. At a controller client replacing the intended policy representation, the needed behavior is to replace the addressed resource. That difference at a controller client replacing the intended policy representation favors PUT; DELETE solves another problem.
Answer A is incorrect because Content-Type: application/json labels the request body as JSON. It is appropriate for sending a JSON request payload. At a controller client replacing the intended policy representation, the needed behavior is to replace the addressed resource. That difference at a controller client replacing the intended policy representation favors PUT; Content-Type: application/json solves another problem.
Answer B is incorrect because Create, Read, Update, Delete (CRUD) names create read update delete operations. It is appropriate for mapping data actions to API operations. At a controller client replacing the intended policy representation, the needed behavior is to replace the addressed resource. That difference at a controller client replacing the intended policy representation favors PUT; Create, Read, Update, Delete (CRUD) solves another problem.
Question 4
An orchestration workflow removing an obsolete test object. The requirement is to remove the addressed API resource. Which option matches the API or automation evidence? Choose ONE.
- GET
- An authorization token in the request
- A resource URI
- DELETE
Correct Answer: D
Correct Answer
Answer D is correct because DELETE fits an orchestration workflow removing an obsolete test object. It removes the addressed API resource. This is appropriate for deleting a known managed object. The scenario needs to remove the selected resource, so DELETE matches the operational evidence at an orchestration workflow removing an obsolete test object.
Incorrect Answers
Answer B is incorrect because An authorization token in the request carries accepted client authorization credentials. It is appropriate for calling a protected API endpoint. At an orchestration workflow removing an obsolete test object, the needed behavior is to remove the selected resource. That difference at an orchestration workflow removing an obsolete test object favors DELETE; An authorization token in the request solves another problem.
Answer C is incorrect because A resource URI identifies the target API resource. It is appropriate for addressing one object or collection. At an orchestration workflow removing an obsolete test object, the needed behavior is to remove the selected resource. That difference at an orchestration workflow removing an obsolete test object favors DELETE; A resource URI solves another problem.
Answer A is incorrect because GET reads an existing API resource. It is appropriate for retrieving current device or policy data. At an orchestration workflow removing an obsolete test object, the needed behavior is to remove the selected resource. That difference at an orchestration workflow removing an obsolete test object favors DELETE; GET solves another problem.
Question 5
During a monitoring script calling a protected device endpoint, the engineer needs a capability that will authenticate or authorize the API client before access to a protected endpoint. Which option matches the API or automation evidence? Choose ONE.
- An authorization token in the request
- Content-Type: application/json
- Create, Read, Update, Delete (CRUD)
- POST
Correct Answer: A
Correct Answer
Answer A is correct because An authorization token in the request fits a monitoring script calling a protected device endpoint. It carries accepted client authorization credentials. This is appropriate for calling a protected API endpoint. The scenario needs to prove access to the API, so An authorization token in the request matches the operational evidence at a monitoring script calling a protected device endpoint.
Incorrect Answers
Answer B is incorrect because Content-Type: application/json labels the request body as JSON. It is appropriate for sending a JSON request payload. At a monitoring script calling a protected device endpoint, the needed behavior is to prove access to the API. That difference at a monitoring script calling a protected device endpoint favors An authorization token in the request; Content-Type: application/json solves another problem.
Answer C is incorrect because Create, Read, Update, Delete (CRUD) names create read update delete operations. It is appropriate for mapping data actions to API operations. At a monitoring script calling a protected device endpoint, the needed behavior is to prove access to the API. That difference at a monitoring script calling a protected device endpoint favors An authorization token in the request; Create, Read, Update, Delete (CRUD) solves another problem.
Answer D is incorrect because POST submits data to create a resource. It is appropriate for creating a child or collection item. At a monitoring script calling a protected device endpoint, the needed behavior is to prove access to the API. That difference at a monitoring script calling a protected device endpoint favors An authorization token in the request; POST solves another problem.
Question 6
A design review for a client sending a JSON body that creates a policy focuses on one requirement: identify the encoding of the request body as JSON. Which option directly satisfies the requirement? Choose ONE.
- GET
- Content-Type: application/json
- PUT
- A resource URI
Correct Answer: B
Correct Answer
Answer B is correct because Content-Type: application/json fits a client sending a JSON body that creates a policy. It labels the request body as JSON. This is appropriate for sending a JSON request payload. The scenario needs to declare JSON body encoding, so Content-Type: application/json matches the operational evidence at a client sending a JSON body that creates a policy.
Incorrect Answers
Answer D is incorrect because A resource URI identifies the target API resource. It is appropriate for addressing one object or collection. At a client sending a JSON body that creates a policy, the needed behavior is to declare JSON body encoding. That difference at a client sending a JSON body that creates a policy favors Content-Type: application/json; A resource URI solves another problem.
Answer A is incorrect because GET reads an existing API resource. It is appropriate for retrieving current device or policy data. At a client sending a JSON body that creates a policy, the needed behavior is to declare JSON body encoding. That difference at a client sending a JSON body that creates a policy favors Content-Type: application/json; GET solves another problem.
Answer C is incorrect because PUT replaces data at a known URI. It is appropriate for updating a complete resource representation. At a client sending a JSON body that creates a policy, the needed behavior is to declare JSON body encoding. That difference at a client sending a JSON body that creates a policy favors Content-Type: application/json; PUT solves another problem.
Question 7
The evidence from an engineer addressing one interface resource through an API shows that the selected mechanism must address the exact REST resource or collection being operated on. Which mechanism should the engineer select? Choose ONE.
- DELETE
- Create, Read, Update, Delete (CRUD)
- A resource URI
- POST
Correct Answer: C
Correct Answer
Answer C is correct because A resource URI fits an engineer addressing one interface resource through an API. It identifies the target API resource. This is appropriate for addressing one object or collection. The scenario needs to select the target resource, so A resource URI matches the operational evidence at an engineer addressing one interface resource through an API.
Incorrect Answers
Answer B is incorrect because Create, Read, Update, Delete (CRUD) names create read update delete operations. It is appropriate for mapping data actions to API operations. At an engineer addressing one interface resource through an API, the needed behavior is to select the target resource. That difference at an engineer addressing one interface resource through an API favors A resource URI; Create, Read, Update, Delete (CRUD) solves another problem.
Answer D is incorrect because POST submits data to create a resource. It is appropriate for creating a child or collection item. At an engineer addressing one interface resource through an API, the needed behavior is to select the target resource. That difference at an engineer addressing one interface resource through an API favors A resource URI; POST solves another problem.
Answer A is incorrect because DELETE removes the addressed API resource. It is appropriate for deleting a known managed object. At an engineer addressing one interface resource through an API, the needed behavior is to select the target resource. That difference at an engineer addressing one interface resource through an API favors A resource URI; DELETE solves another problem.
Question 8
An engineer working on a developer mapping business data operations to a REST interface must recognize the standard create/read/update/delete data-operation model. Which technology, method, or construct provides that behavior most directly? Choose ONE.
- GET
- PUT
- An authorization token in the request
- Create, Read, Update, Delete (CRUD)
Correct Answer: D
Correct Answer
Answer D is correct because Create, Read, Update, Delete (CRUD) fits a developer mapping business data operations to a REST interface. It names create read update delete operations. This is appropriate for mapping data actions to API operations. The scenario needs to recognize the CRUD model, so Create, Read, Update, Delete (CRUD) matches the operational evidence at a developer mapping business data operations to a REST interface.
Incorrect Answers
Answer A is incorrect because GET reads an existing API resource. It is appropriate for retrieving current device or policy data. At a developer mapping business data operations to a REST interface, the needed behavior is to recognize the CRUD model. That difference at a developer mapping business data operations to a REST interface favors Create, Read, Update, Delete (CRUD); GET solves another problem.
Answer B is incorrect because PUT replaces data at a known URI. It is appropriate for updating a complete resource representation. At a developer mapping business data operations to a REST interface, the needed behavior is to recognize the CRUD model. That difference at a developer mapping business data operations to a REST interface favors Create, Read, Update, Delete (CRUD); PUT solves another problem.
Answer C is incorrect because An authorization token in the request carries accepted client authorization credentials. It is appropriate for calling a protected API endpoint. At a developer mapping business data operations to a REST interface, the needed behavior is to recognize the CRUD model. That difference at a developer mapping business data operations to a REST interface favors Create, Read, Update, Delete (CRUD); An authorization token in the request solves another problem.
Question 9
A branch team automating repetitive VLAN deployment. The requirement is to encode an ordered repeatable task workflow in YAML. Which choice is correct for this use case? Choose ONE.
- An Ansible playbook written in YAML
- An Ansible network module
- A Terraform provider
- An Ansible inventory
Correct Answer: A
Correct Answer
Answer A is correct because An Ansible playbook written in YAML fits a branch team automating repetitive VLAN deployment. It defines repeatable automation tasks in YAML. This is appropriate for running ordered configuration workflows. The scenario needs to encode the automation workflow, so An Ansible playbook written in YAML matches the operational evidence at a branch team automating repetitive VLAN deployment.
Incorrect Answers
Answer D is incorrect because An Ansible inventory groups managed hosts and variables. It is appropriate for targeting selected device groups. At a branch team automating repetitive VLAN deployment, the needed behavior is to encode the automation workflow. That difference at a branch team automating repetitive VLAN deployment favors An Ansible playbook written in YAML; An Ansible inventory solves another problem.
Answer B is incorrect because An Ansible network module performs a reusable automation task. It is appropriate for executing supported device operations. At a branch team automating repetitive VLAN deployment, the needed behavior is to encode the automation workflow. That difference at a branch team automating repetitive VLAN deployment favors An Ansible playbook written in YAML; An Ansible network module solves another problem.
Answer C is incorrect because A Terraform provider connects Terraform to a platform API. It is appropriate for managing vendor resources through Terraform. At a branch team automating repetitive VLAN deployment, the needed behavior is to encode the automation workflow. That difference at a branch team automating repetitive VLAN deployment favors An Ansible playbook written in YAML; A Terraform provider solves another problem.
Question 10
During an automation controller grouping twenty access switches, the engineer needs a capability that will group and describe the managed hosts that a playbook targets. Which mechanism should the engineer select? Choose ONE.
- Terraform state
- An Ansible inventory
- Ansible agentless automation
- Terraform configuration in HCL
Correct Answer: B
Correct Answer
Answer B is correct because An Ansible inventory fits an automation controller grouping twenty access switches. It groups managed hosts and variables. This is appropriate for targeting selected device groups. The scenario needs to define playbook targets, so An Ansible inventory matches the operational evidence at an automation controller grouping twenty access switches.
Incorrect Answers
Answer C is incorrect because Ansible agentless automation uses existing remote management interfaces. It is appropriate for automating devices without resident agents. At an automation controller grouping twenty access switches, the needed behavior is to define playbook targets. That difference at an automation controller grouping twenty access switches favors An Ansible inventory; Ansible agentless automation solves another problem.
Answer D is incorrect because Terraform configuration in HCL declares desired infrastructure resources in HCL. It is appropriate for describing infrastructure as code. At an automation controller grouping twenty access switches, the needed behavior is to define playbook targets. That difference at an automation controller grouping twenty access switches favors An Ansible inventory; Terraform configuration in HCL solves another problem.
Answer A is incorrect because Terraform state tracks Terraform-managed resource mappings. It is appropriate for remembering resources between Terraform runs. At an automation controller grouping twenty access switches, the needed behavior is to define playbook targets. That difference at an automation controller grouping twenty access switches favors An Ansible inventory; Terraform state solves another problem.
Question 11
A design review for a network team avoiding permanent agents on branch routers focuses on one requirement: automate devices through existing remote interfaces without installing resident agents. Which choice is correct for this use case? Choose ONE.
- An Ansible network module
- A Terraform provider
- Ansible agentless automation
- terraform plan
Correct Answer: C
Correct Answer
Answer C is correct because Ansible agentless automation fits a network team avoiding permanent agents on branch routers. It uses existing remote management interfaces. This is appropriate for automating devices without resident agents. The scenario needs to avoid installing endpoint agents, so Ansible agentless automation matches the operational evidence at a network team avoiding permanent agents on branch routers.
Incorrect Answers
Answer A is incorrect because An Ansible network module performs a reusable automation task. It is appropriate for executing supported device operations. At a network team avoiding permanent agents on branch routers, the needed behavior is to avoid installing endpoint agents. That difference at a network team avoiding permanent agents on branch routers favors Ansible agentless automation; An Ansible network module solves another problem.
Answer B is incorrect because A Terraform provider connects Terraform to a platform API. It is appropriate for managing vendor resources through Terraform. At a network team avoiding permanent agents on branch routers, the needed behavior is to avoid installing endpoint agents. That difference at a network team avoiding permanent agents on branch routers favors Ansible agentless automation; A Terraform provider solves another problem.
Answer D is incorrect because terraform plan previews proposed Terraform changes. It is appropriate for reviewing changes before apply. At a network team avoiding permanent agents on branch routers, the needed behavior is to avoid installing endpoint agents. That difference at a network team avoiding permanent agents on branch routers favors Ansible agentless automation; terraform plan solves another problem.
Question 12
The evidence from an infrastructure-as-code repository defining network resources shows that the selected mechanism must declare desired infrastructure resources and attributes in Terraform configuration. Which answer best explains the observed behavior? Choose ONE.
- terraform plan
- An Ansible inventory
- A Terraform provider
- Terraform configuration in HCL
Correct Answer: D
Correct Answer
Answer D is correct because Terraform configuration in HCL fits an infrastructure-as-code repository defining network resources. It declares desired infrastructure resources in HCL. This is appropriate for describing infrastructure as code. The scenario needs to declare desired infrastructure state, so Terraform configuration in HCL matches the operational evidence at an infrastructure-as-code repository defining network resources.
Incorrect Answers
Answer C is incorrect because A Terraform provider connects Terraform to a platform API. It is appropriate for managing vendor resources through Terraform. At an infrastructure-as-code repository defining network resources, the needed behavior is to declare desired infrastructure state. That difference at an infrastructure-as-code repository defining network resources favors Terraform configuration in HCL; A Terraform provider solves another problem.
Answer A is incorrect because terraform plan previews proposed Terraform changes. It is appropriate for reviewing changes before apply. At an infrastructure-as-code repository defining network resources, the needed behavior is to declare desired infrastructure state. That difference at an infrastructure-as-code repository defining network resources favors Terraform configuration in HCL; terraform plan solves another problem.
Answer B is incorrect because An Ansible inventory groups managed hosts and variables. It is appropriate for targeting selected device groups. At an infrastructure-as-code repository defining network resources, the needed behavior is to declare desired infrastructure state. That difference at an infrastructure-as-code repository defining network resources favors Terraform configuration in HCL; An Ansible inventory solves another problem.
Question 13
An engineer working on a Terraform workflow integrating with a network controller must load the integration plugin that communicates with the target platform API. Which technology, method, or construct provides that behavior most directly? Choose ONE.
- A Terraform provider
- Ansible agentless automation
- Terraform state
- An Ansible playbook written in YAML
Correct Answer: A
Correct Answer
Answer A is correct because A Terraform provider fits a Terraform workflow integrating with a network controller. It connects Terraform to a platform API. This is appropriate for managing vendor resources through Terraform. The scenario needs to integrate Terraform with the platform, so A Terraform provider matches the operational evidence at a Terraform workflow integrating with a network controller.
Incorrect Answers
Answer C is incorrect because Terraform state tracks Terraform-managed resource mappings. It is appropriate for remembering resources between Terraform runs. At a Terraform workflow integrating with a network controller, the needed behavior is to integrate Terraform with the platform. That difference at a Terraform workflow integrating with a network controller favors A Terraform provider; Terraform state solves another problem.
Answer D is incorrect because An Ansible playbook written in YAML defines repeatable automation tasks in YAML. It is appropriate for running ordered configuration workflows. At a Terraform workflow integrating with a network controller, the needed behavior is to integrate Terraform with the platform. That difference at a Terraform workflow integrating with a network controller favors A Terraform provider; An Ansible playbook written in YAML solves another problem.
Answer B is incorrect because Ansible agentless automation uses existing remote management interfaces. It is appropriate for automating devices without resident agents. At a Terraform workflow integrating with a network controller, the needed behavior is to integrate Terraform with the platform. That difference at a Terraform workflow integrating with a network controller favors A Terraform provider; Ansible agentless automation solves another problem.
Question 14
A change-review pipeline previewing infrastructure differences. The requirement is to preview intended infrastructure changes before applying them. Which mechanism should the engineer select? Choose ONE.
- An Ansible playbook written in YAML
- terraform plan
- Ansible agentless automation
- Terraform configuration in HCL
Correct Answer: B
Correct Answer
Answer B is correct because terraform plan fits a change-review pipeline previewing infrastructure differences. It previews proposed Terraform changes. This is appropriate for reviewing changes before apply. The scenario needs to preview the pending change set, so terraform plan matches the operational evidence at a change-review pipeline previewing infrastructure differences.
Incorrect Answers
Answer A is incorrect because An Ansible playbook written in YAML defines repeatable automation tasks in YAML. It is appropriate for running ordered configuration workflows. At a change-review pipeline previewing infrastructure differences, the needed behavior is to preview the pending change set. That difference at a change-review pipeline previewing infrastructure differences favors terraform plan; An Ansible playbook written in YAML solves another problem.
Answer C is incorrect because Ansible agentless automation uses existing remote management interfaces. It is appropriate for automating devices without resident agents. At a change-review pipeline previewing infrastructure differences, the needed behavior is to preview the pending change set. That difference at a change-review pipeline previewing infrastructure differences favors terraform plan; Ansible agentless automation solves another problem.
Answer D is incorrect because Terraform configuration in HCL declares desired infrastructure resources in HCL. It is appropriate for describing infrastructure as code. At a change-review pipeline previewing infrastructure differences, the needed behavior is to preview the pending change set. That difference at a change-review pipeline previewing infrastructure differences favors terraform plan; Terraform configuration in HCL solves another problem.
Question 15
An API response describing one router with named fields receives this payload: {“hostname”:”sw1″,”role”:”access”}. What JSON structure is the outermost value? Choose ONE.
- Standard JSON value types
- Valid standard JSON syntax
- A JSON object enclosed in { }
- A JSON array enclosed in [ ]
Correct Answer: C
Correct Answer
Answer C is correct because A JSON object enclosed in { } fits an API response describing one router with named fields. It groups named members inside braces. This is appropriate for representing one structured record. The scenario needs to identify a JSON object, so A JSON object enclosed in { } matches the operational evidence at an API response describing one router with named fields.
Incorrect Answers
Answer D is incorrect because A JSON array enclosed in [ ] stores ordered values inside brackets. It is appropriate for representing a list of items. At an API response describing one router with named fields, the needed behavior is to identify a JSON object. That difference at an API response describing one router with named fields favors A JSON object enclosed in { }; A JSON array enclosed in [ ] solves another problem.
Answer A is incorrect because Standard JSON value types represents standard JSON value forms. It is appropriate for interpreting JSON primitive and container values. At an API response describing one router with named fields, the needed behavior is to identify a JSON object. That difference at an API response describing one router with named fields favors A JSON object enclosed in { }; Standard JSON value types solves another problem.
Answer B is incorrect because Valid standard JSON syntax follows standard JSON syntax rules. It is appropriate for sending parser-compatible request bodies. At an API response describing one router with named fields, the needed behavior is to identify a JSON object. That difference at an API response describing one router with named fields favors A JSON object enclosed in { }; Valid standard JSON syntax solves another problem.
Question 16
An API response returning a list of interface records receives this payload: [{“id”:101},{“id”:102}]. What JSON structure is represented by the outermost brackets? Choose ONE.
- A JSON object enclosed in { }
- A JSON object key/value member
- Follow the nested JSON hierarchy
- A JSON array enclosed in [ ]
Correct Answer: D
Correct Answer
Answer D is correct because A JSON array enclosed in [ ] fits an API response returning a list of interface records. It stores ordered values inside brackets. This is appropriate for representing a list of items. The scenario needs to identify a JSON array, so A JSON array enclosed in [ ] matches the operational evidence at an API response returning a list of interface records.
Incorrect Answers
Answer B is incorrect because A JSON object key/value member associates a key with its value. It is appropriate for reading one object member. At an API response returning a list of interface records, the needed behavior is to identify a JSON array. That difference at an API response returning a list of interface records favors A JSON array enclosed in [ ]; A JSON object key/value member solves another problem.
Answer C is incorrect because Follow the nested JSON hierarchy follows keys and array indexes. It is appropriate for locating a nested response value. At an API response returning a list of interface records, the needed behavior is to identify a JSON array. That difference at an API response returning a list of interface records favors A JSON array enclosed in [ ]; Follow the nested JSON hierarchy solves another problem.
Answer A is incorrect because A JSON object enclosed in { } groups named members inside braces. It is appropriate for representing one structured record. At an API response returning a list of interface records, the needed behavior is to identify a JSON array. That difference at an API response returning a list of interface records favors A JSON array enclosed in [ ]; A JSON object enclosed in { } solves another problem.
Question 17
An engineer reading the member named status from an object examines this JSON: {“status”:”up”,”mtu”:1500}. Which statement correctly describes the syntax joining a member name to its value? Choose ONE.
- A JSON object key/value member
- Standard JSON value types
- Valid standard JSON syntax
- A JSON array enclosed in [ ]
Correct Answer: A
Correct Answer
Answer A is correct because A JSON object key/value member fits an engineer reading the member named status from an object. It associates a key with its value. This is appropriate for reading one object member. The scenario needs to recognize a key-value member, so A JSON object key/value member matches the operational evidence at an engineer reading the member named status from an object.
Incorrect Answers
Answer B is incorrect because Standard JSON value types represents standard JSON value forms. It is appropriate for interpreting JSON primitive and container values. At an engineer reading the member named status from an object, the needed behavior is to recognize a key-value member. That difference at an engineer reading the member named status from an object favors A JSON object key/value member; Standard JSON value types solves another problem.
Answer C is incorrect because Valid standard JSON syntax follows standard JSON syntax rules. It is appropriate for sending parser-compatible request bodies. At an engineer reading the member named status from an object, the needed behavior is to recognize a key-value member. That difference at an engineer reading the member named status from an object favors A JSON object key/value member; Valid standard JSON syntax solves another problem.
Answer D is incorrect because A JSON array enclosed in [ ] stores ordered values inside brackets. It is appropriate for representing a list of items. At an engineer reading the member named status from an object, the needed behavior is to recognize a key-value member. That difference at an engineer reading the member named status from an object favors A JSON object key/value member; A JSON array enclosed in [ ] solves another problem.
Question 18
An API payload containing an MTU number and enabled boolean receives {“enabled”:true,”mtu”:1500,”note”:null,”name”:”edge1″}. Which option correctly identifies the value forms used here? Choose ONE.
- A JSON object enclosed in { }
- Standard JSON value types
- A JSON object key/value member
- Follow the nested JSON hierarchy
Correct Answer: B
Correct Answer
Answer B is correct because Standard JSON value types fits an API payload containing an MTU number and enabled boolean. It represents standard JSON value forms. This is appropriate for interpreting JSON primitive and container values. The scenario needs to identify JSON value types, so Standard JSON value types matches the operational evidence at an API payload containing an MTU number and enabled boolean.
Incorrect Answers
Answer D is incorrect because Follow the nested JSON hierarchy follows keys and array indexes. It is appropriate for locating a nested response value. At an API payload containing an MTU number and enabled boolean, the needed behavior is to identify JSON value types. That difference at an API payload containing an MTU number and enabled boolean favors Standard JSON value types; Follow the nested JSON hierarchy solves another problem.
Answer A is incorrect because A JSON object enclosed in { } groups named members inside braces. It is appropriate for representing one structured record. At an API payload containing an MTU number and enabled boolean, the needed behavior is to identify JSON value types. That difference at an API payload containing an MTU number and enabled boolean favors Standard JSON value types; A JSON object enclosed in { } solves another problem.
Answer C is incorrect because A JSON object key/value member associates a key with its value. It is appropriate for reading one object member. At an API payload containing an MTU number and enabled boolean, the needed behavior is to identify JSON value types. That difference at an API payload containing an MTU number and enabled boolean favors Standard JSON value types; A JSON object key/value member solves another problem.
Question 19
An engineer locating the first interface name inside nested data receives {“devices”:[{“name”:”r1″,”interfaces”:[{“name”:”Gi0/0″},{“name”:”Gi0/1″}]}]}. Which method should be used to locate the value Gi0/1 correctly? Choose ONE.
- Standard JSON value types
- Valid standard JSON syntax
- Follow the nested JSON hierarchy
- A JSON array enclosed in [ ]
Correct Answer: C
Correct Answer
Answer C is correct because Follow the nested JSON hierarchy fits an engineer locating the first interface name inside nested data. It follows keys and array indexes. This is appropriate for locating a nested response value. The scenario needs to trace the nested hierarchy, so Follow the nested JSON hierarchy matches the operational evidence at an engineer locating the first interface name inside nested data.
Incorrect Answers
Answer B is incorrect because Valid standard JSON syntax follows standard JSON syntax rules. It is appropriate for sending parser-compatible request bodies. At an engineer locating the first interface name inside nested data, the needed behavior is to trace the nested hierarchy. That difference at an engineer locating the first interface name inside nested data favors Follow the nested JSON hierarchy; Valid standard JSON syntax solves another problem.
Answer D is incorrect because A JSON array enclosed in [ ] stores ordered values inside brackets. It is appropriate for representing a list of items. At an engineer locating the first interface name inside nested data, the needed behavior is to trace the nested hierarchy. That difference at an engineer locating the first interface name inside nested data favors Follow the nested JSON hierarchy; A JSON array enclosed in [ ] solves another problem.
Answer A is incorrect because Standard JSON value types represents standard JSON value forms. It is appropriate for interpreting JSON primitive and container values. At an engineer locating the first interface name inside nested data, the needed behavior is to trace the nested hierarchy. That difference at an engineer locating the first interface name inside nested data favors Follow the nested JSON hierarchy; Standard JSON value types solves another problem.
Question 20
A developer validating a request body before posting it compares candidate request bodies. Which payload is valid JSON? Choose ONE.
- {‘name’:’edge’,’enabled’:True}
- {“name”:”edge”,”enabled”:true,}
- {name:”edge”,enabled:true}
- {“enabled”:true,”tags”:[“edge”,”prod”]}
Correct Answer: D
Correct Answer
Answer D is correct because For a developer validating a request body before posting it, this candidate is valid standard JSON: object keys and string values use double quotes, the boolean literal is lowercase, and no trailing comma appears. A standards-compliant parser can therefore accept the body directly.
Incorrect Answers
Answer A is incorrect because For a developer validating a request body before posting it, this candidate is invalid JSON because it contains single quotes, capitalized Python-style booleans. The request body must follow standard JSON quoting and literal rules, so the API parser can reject this form before processing the data.
Answer B is incorrect because For a developer validating a request body before posting it, this candidate is invalid JSON because it contains a trailing comma. The request body must follow standard JSON quoting and literal rules, so the API parser can reject this form before processing the data.
Answer C is incorrect because For a developer validating a request body before posting it, this candidate is invalid JSON because it contains an unquoted object key. The request body must follow standard JSON quoting and literal rules, so the API parser can reject this form before processing the data.