Moonborn — API · config
Lock or unlock a config item at a scope (prevents lower-scope overrides)
PATCH/v1/config/{key}/lockscope · Bearer (API key or session JWT)
Path parameters
| Field | Type | Description |
|---|---|---|
| keyreq | string |
Query parameters
| Field | Type | Description |
|---|---|---|
| scope_level | string | |
| scope_id | string |
Request body
| Field | Type | Description |
|---|---|---|
| lockedreq | boolean | |
| reason | string |
Responses
200Lock state updated
Body
| Field | Type | Description |
|---|---|---|
| eventreq | object |
401Unauthenticated
Body
| Field | Type | Description |
|---|---|---|
| typereq | string | |
| titlereq | string | |
| statusreq | number | |
| detail | string | |
| code | string |
403Forbidden (insufficient scope)
Body
| Field | Type | Description |
|---|---|---|
| typereq | string | |
| titlereq | string | |
| statusreq | number | |
| detail | string | |
| code | string |
404Config item not found
Body
| Field | Type | Description |
|---|---|---|
| typereq | string | |
| titlereq | string | |
| statusreq | number | |
| detail | string | |
| code | string |
Examples
cURL
curl -X PATCH https://api.moonborn.co/v1/config/<key>/lock \
-H "Authorization: Bearer $MOONBORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locked": false
}'TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.config.lockConfigItem({
key: '<key>',
locked: false,
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.config.lock_config_item(
key="<key>",
locked=False,
)