Help Center/ Cloud Container Instance/ API Reference/ Appendix/ Patch Request Method Operation Description
Updated on 2023-12-21 GMT+08:00

Patch Request Method Operation Description

Kubernetes APIs use the HTTP header "Content-Type" to distinguish between patch operations.

Operation Description

Currently, two types of patch request method operations are supported:

  1. Merge Patch, Content-Type: application/merge-patch+json

    According to RFC 7386, merge patch contains some description of a resource object (namely, JSON object). The JSON object is submitted to the server end, and merges with the current object of the server end (that is, replaces the list field of the current resource object) to form a new object.

  2. Strategic Merge Patch, Content-Type: application/strategic-merge-patch+json

    Strategic Merge Patch is used to add legal metadata to API objects, and uses new metadata to determine which list should be merged and which should not. The current metadata is used as the structure labels.

For more information about the difference between Merge Patch and Strategic Merge Patch, see Patch Request Method Operation Examples.