Moonborn — API · config
Take a snapshot of the current config for a scope
POST/v1/config/snapshotsscope · Bearer (API key or session JWT)
Request body
| Field | Type | Description |
|---|---|---|
| scopereq | object | |
| scope.levelreq | string · "system" | "env" | "plan" | "org" | "workspace" | "user" | "api_key" | "request" | |
| scope.id | string | default: "" |
| label | string |
Responses
201Snapshot created
Body
| Field | Type | Description |
|---|---|---|
| idreq | string | |
| scopeLevelreq | string · "system" | "env" | "plan" | "org" | "workspace" | "user" | "api_key" | "request" | |
| scopeIdreq | string | |
| labelreq | string | |
| itemCountreq | number | |
| createdByreq | string | |
| createdAtreq | string |
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 |
422Validation failure
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 \
-H "Authorization: Bearer $MOONBORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scope": {
"level": "system"
}
}'TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.config.createConfigSnapshot({
scope: {"level":"system"},
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.config.create_config_snapshot(
scope={"level":"system"},
)