Question 230
A REST API client receives HTTP 200 and assumes a configuration change was created, but the payload describes a read result. What is the best implementation or corrective action?
Explanation
Correct Answer
A successful HTTP response is not by itself proof that the intended configuration changed. A direct operational check is: The follow-up GET confirms the desired setting rather than inferring state from 200 alone.
Incorrect Answers
That action addresses a different condition: an API request fails with HTTP 400 because a field violates the controller's validation schema. HTTP 400 generally means the client request is malformed or unacceptable.
That action addresses a different condition: a RESTCONF update returns HTTP 204 No Content and a developer treats the empty body as a failure. A no-content success is normal for certain update and delete operations.
That action addresses a different condition: an API responds with HTTP 429 after an automation loop sends a burst of requests. 429 indicates excessive request rate rather than invalid object configuration.