Apply RFC 6902 patch to a config version
PATCH
/v1/ns/{nsid}/config/{version}
const url = 'https://example.com/v1/ns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/config/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/yaml'}, body: '[ "example" ]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/ns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/config/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/yaml' \ --data '[ "example" ]'Body is a JSON Patch document (array of ops), encoded as YAML or JSON.
Add ?rebase=true or X-Rebase: true to auto-rebase against latest.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”nsid
required
string format: uuid
Namespace UUID
version
required
string
Config version: ULID, ‘latest’, ‘running’, or a tag name
Query Parameters
Section titled “Query Parameters”rebase
boolean
Auto-rebase patch onto current latest when stale
base
string
Belt-and-suspenders precondition; must agree with URL version
Request Bodyrequired
Section titled “Request Bodyrequired”array
array
Examplegenerated
[ "example"]Responses
Section titled “Responses”Patched version stored
Media typeapplication/json
object
success
required
boolean
source_version
required
string
new_version
required
string
rebased_onto
Set when auto-rebase was applied
string
Examplegenerated
{ "success": true, "source_version": "example", "new_version": "example", "rebased_onto": "example"}default
Section titled “default”Error response
Media typeapplication/problem+json
RFC 7807 Problem Details
object
type
Problem type slug URI
string
title
string
status
integer
detail
string
key
additional properties
any
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}