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.
Question
Refer to the exhibit. What caused the error in this API request?
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)- A6% (3)
- B2% (1)
- C4% (2)
- D89% (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.
If the resource did not support POST, the server would return a 405 Method Not Allowed HTTP error, not a payload parsing error.
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.
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.
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
Community Discussion
No community discussion yet for this question.
