Uygulamayı aç
Moonborn — API · config

Set multiple config items in a single scoped write

POST/v1/config/bulkscope · Bearer (API key or session JWT)
Request body
FieldTypeDescription
scopereqobject
scope.levelreqstring · "system" | "env" | "plan" | "org" | "workspace" | "user" | "api_key" | "request"
scope.idstringdefault: ""
itemsreqobject[]
reasonstring

Responses

200Bulk applied
Body
FieldTypeDescription
appliedreqnumber
eventsreqobject[]
401Unauthenticated
Body
FieldTypeDescription
typereqstring
titlereqstring
statusreqnumber
detailstring
codestring
403Forbidden (scope lock or tier)
Body
FieldTypeDescription
typereqstring
titlereqstring
statusreqnumber
detailstring
codestring
422Validation failure
Body
FieldTypeDescription
typereqstring
titlereqstring
statusreqnumber
detailstring
codestring

Examples

cURL
curl -X POST https://api.moonborn.co/v1/config/bulk \
  -H "Authorization: Bearer $MOONBORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "scope": {
        "level": "system"
      },
      "items": [
        {
          "key": "<string>",
          "value": null
        }
      ]
    }'
TypeScript
import Moonborn from '@moonborn/sdk';

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

const result = await client.config.bulkSetConfig({
  scope: {"level":"system"},
  items: [{"key":"<string>","value":null}],
});
Python
import os
from moonborn import Moonborn

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

result = client.config.bulk_set_config(
    scope={"level":"system"},
    items=[{"key":"<string>","value":null}],
)