Uygulamayı aç
Moonborn — API · config

Roll back a scope to a previous config snapshot

POST/v1/config/snapshots/{snapshotId}/rollbackscope · Bearer (API key or session JWT)
Path parameters
FieldTypeDescription
snapshotIdreqstring
Request body
FieldTypeDescription
reasonstring

Responses

200Rollback applied
Body
FieldTypeDescription
appliedCountreqnumber
eventsreqobject[]
401Unauthenticated
Body
FieldTypeDescription
typereqstring
titlereqstring
statusreqnumber
detailstring
codestring
403Forbidden
Body
FieldTypeDescription
typereqstring
titlereqstring
statusreqnumber
detailstring
codestring
404Snapshot not found
Body
FieldTypeDescription
typereqstring
titlereqstring
statusreqnumber
detailstring
codestring

Examples

cURL
curl -X POST https://api.moonborn.co/v1/config/snapshots/<snapshotId>/rollback \
  -H "Authorization: Bearer $MOONBORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "reason": "<string>"
    }'
TypeScript
import Moonborn from '@moonborn/sdk';

const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });

const result = await client.config.rollbackToSnapshot({
  snapshotId: '<snapshotId>',
  reason: "<string>",
});
Python
import os
from moonborn import Moonborn

client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])

result = client.config.rollback_to_snapshot(
    snapshotId="<snapshotId>",
    reason="<string>",
)