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
| Field | Type | Description |
|---|---|---|
| snapshotIdreq | string |
Request body
| Field | Type | Description |
|---|---|---|
| reason | string |
Responses
200Rollback applied
Body
| Field | Type | Description |
|---|---|---|
| appliedCountreq | number | |
| eventsreq | object[] |
401Unauthenticated
Body
| Field | Type | Description |
|---|---|---|
| typereq | string | |
| titlereq | string | |
| statusreq | number | |
| detail | string | |
| code | string |
403Forbidden
Body
| Field | Type | Description |
|---|---|---|
| typereq | string | |
| titlereq | string | |
| statusreq | number | |
| detail | string | |
| code | string |
404Snapshot not found
Body
| Field | Type | Description |
|---|---|---|
| typereq | string | |
| titlereq | string | |
| statusreq | number | |
| detail | string | |
| code | string |
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>",
)