Uygulamayı aç
Moonborn — API · config

Set a config item value at a specific scope

PUT/v1/config/{key}scope · Bearer (API key or session JWT)
Path parameters
FieldTypeDescription
keyreqstring
Query parameters
FieldTypeDescription
scope_levelstring
scope_idstring
Request body
FieldTypeDescription
valuereqobject
reasonstring
ticketRefstring
expiresAtstring

Responses

200Config item set
Body
FieldTypeDescription
eventreqobject
401Unauthenticated
Body
FieldTypeDescription
typereqstring
titlereqstring
statusreqnumber
detailstring
codestring
403Forbidden (locked or tier-gated)
Body
FieldTypeDescription
typereqstring
titlereqstring
statusreqnumber
detailstring
codestring
404Config item not found
Body
FieldTypeDescription
typereqstring
titlereqstring
statusreqnumber
detailstring
codestring
422Validation failure
Body
FieldTypeDescription
typereqstring
titlereqstring
statusreqnumber
detailstring
codestring

Examples

cURL
curl -X PUT https://api.moonborn.co/v1/config/<key> \
  -H "Authorization: Bearer $MOONBORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "value": null
    }'
TypeScript
import Moonborn from '@moonborn/sdk';

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

const result = await client.config.setConfigItem({
  key: '<key>',
  value: null,
});
Python
import os
from moonborn import Moonborn

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

result = client.config.set_config_item(
    key="<key>",
    value=None,
)