nerdexam
Cisco

200-901 · Question #60

Refer to the exhibit. What caused the error in this API request?

The correct answer is D. The submitted JSON payload has a formatting issue. REST API requests require syntactically valid JSON payloads; a formatting error such as a missing comma, bracket, or quote causes the server to reject the request before processing.

Understanding and Using APIs

Question

Refer to the exhibit. What caused the error in this API request?

Exhibit

200-901 question #60 exhibit

Options

  • AThe API resource does not support the POST operation
  • BThe API resource does not support JSON format payloads.
  • CThe submitted JSON payload includes a field that is not supported by the API resource.
  • DThe submitted JSON payload has a formatting issue

How the community answered

(53 responses)
  • A
    6% (3)
  • B
    2% (1)
  • C
    4% (2)
  • D
    89% (47)

Why each option

REST API requests require syntactically valid JSON payloads; a formatting error such as a missing comma, bracket, or quote causes the server to reject the request before processing.

AThe API resource does not support the POST operation

If the resource did not support POST, the server would return a 405 Method Not Allowed HTTP error, not a payload parsing error.

BThe API resource does not support JSON format payloads.

A rejection of JSON as a content type would produce a 415 Unsupported Media Type response, not the type of error resulting from a malformed body.

CThe submitted JSON payload includes a field that is not supported by the API resource.

An unsupported field in an otherwise valid JSON payload typically returns a 400 Bad Request with a message referencing the unknown field specifically, not a generic formatting error.

DThe submitted JSON payload has a formatting issueCorrect

A JSON formatting issue means the payload is syntactically malformed - for example, missing commas between key-value pairs, unmatched curly braces, or improperly quoted strings. The API server cannot parse the body and returns an error indicating the payload is invalid JSON, which matches the error shown in the exhibit.

Concept tested: JSON payload syntax validation in REST API requests

Source: https://developer.cisco.com/docs/webex/

Topics

#API Error Handling#JSON Syntax#HTTP Request Troubleshooting

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice