A network automation engineer is building Python scripts to manage network infrastructure via Cisco DNA Center and RESTCONF API endpoints. Match each HTTP request component or operation to its correct RESTful behavior.
- HTTP POST request targeting a collection URICreates a new resource or triggers an asynchronous task, typically returning a 201 Created or 202 Accepted status code.
- HTTP PUT request targeting a specific interface resourceReplaces the entire targeted resource state, causing omitted attributes in the payload to revert to default or null values.
- HTTP PATCH request targeting a specific interface resourceApplies a partial update to the targeted resource, modifying only the fields specified in the request payload.
- Accept header set to application/yang-data+jsonInforms the API server that the client expects the response body to be formatted in JSON matching a YANG schema.
Answer
HTTP POST maps to creating a resource or triggering an async task. HTTP PUT maps to replacing the complete representation of a target resource. HTTP PATCH maps to applying partial modifications to a resource. The Accept header specifies the client's expected response format.
Each item matches its fundamental REST API operational characteristic: HTTP POST creates resources/tasks, HTTP PUT replaces the full representation, HTTP PATCH applies partial updates, and the Accept header defines the expected format of response data.
Step-by-Step Solution
Key Concept
Characteristics of REST-Based APIs (CRUD, HTTP Verbs, Data Formats)