nerdexam
Cisco

350-601 · Question #257

An engineer is using REST API calls to configure the cisco APIC. Which data structure must be used within a post message to receive a login token?

The correct answer is A. {"aaaUser":{"attributes":{"name":"apiuser","pwd":"cisco123"}}}. Cisco APIC's REST API accepts both JSON and XML, but the correct JSON structure for authentication uses nested objects with 'aaaUser' as the root key, containing an 'attributes' object with 'name' and 'pwd' keys. Option A shows valid, properly quoted JSON…

Automation

Question

An engineer is using REST API calls to configure the cisco APIC. Which data structure must be used within a post message to receive a login token?

Options

  • A{"aaaUser":{"attributes":{"name":"apiuser","pwd":"cisco123"}}}
  • B<aaaUser><name="apiuser"/><pwd="cisco123"/></aaaUser>
  • C{aaaUser:{attributes:{name:apiuser,pwd:cisco123}}}
  • D<aaaUser><name>apiuser</name><pwd>cisco123</pwd></aaaUser>

How the community answered

(52 responses)
  • A
    90% (47)
  • B
    2% (1)
  • C
    2% (1)
  • D
    6% (3)

Explanation

Cisco APIC's REST API accepts both JSON and XML, but the correct JSON structure for authentication uses nested objects with 'aaaUser' as the root key, containing an 'attributes' object with 'name' and 'pwd' keys. Option A shows valid, properly quoted JSON: {"aaaUser":{"attributes":{"name":"apiuser","pwd":"cisco123"}}}. Options B and D are XML format, which is not JSON. Option C is invalid because JSON requires all keys and string values to be enclosed in double quotes - unquoted keys are not valid JSON and would be rejected by the APIC.

Topics

#REST API#Cisco APIC#API Authentication#JSON Data Structure

Community Discussion

No community discussion yet for this question.

Full 350-601 Practice