Match each HTTP request method and header combination used in Cisco REST-based API operations (such as RESTCONF and Cisco DNA Center) to its correct operational behavior and CRUD/idempotency characteristic.
- HTTP POST with Content-Type: application/yang-data+json to a data root containerExecutes a Create operation; non-idempotent action that creates a new child resource and typically returns HTTP 201 Created.
- HTTP PUT with a complete resource payload targeting an existing interface URIExecutes an Update/Replace operation; idempotent action that completely overwrites the target resource and returns HTTP 200 OK or 204 No Content.
- HTTP PATCH containing specific updated fields targeting an existing device configuration URIExecutes a Modify operation; updates only specified attributes within the target resource while preserving unreferenced fields.
- HTTP GET with Accept: application/yang-data+xml targeting an operational state endpointExecutes a Read operation; safe and idempotent request that requests the server return state data encoded as XML.
- HTTP DELETE targeting an established RESTCONF configuration pathExecutes a Delete operation; idempotent action that removes the target data node and typically returns HTTP 204 No Content.
Cevap
Each HTTP verb and header pair matches directly to its operational CRUD semantics: POST creates child resources, PUT replaces whole resources idempotently, PATCH modifies targeted fields, GET retrieves state data matching the Accept header, and DELETE removes resources idempotently.
Each HTTP verb cleanly maps to a fundamental CRUD operation with defined idempotency and header role rules: POST (Create, non-idempotent), PUT (Replace, idempotent), PATCH (Partial Modify), GET (Read, safe/idempotent with Accept header controlling response format), and DELETE (Delete, idempotent).
Adım Adım Çözüm
Anahtar Kavram
Mapping HTTP Verbs to CRUD Operations, Idempotency Characteristics, and Header Controls in REST APIs