API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen

POST /v1/api-keys

POST/v1/api-keys

Create a new API key. The plaintext token is returned exactly once.

Request Body

NameTypBeschreibung
labelerforderlichstring
descriptionstring
permissionsstring[]
allowedSchemasarraynull
allowedMethodsarraynull
ipAllowlistarraynull
expiresAtstring,null<date-time>
environmentstring

Beispiel

curl -X POST https://api.codemeta-os.de/v1/api-keys \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "label": "string",
  "description": "string",
  "permissions": [],
  "allowedSchemas": null,
  "allowedMethods": null,
  "ipAllowlist": null,
  "expiresAt": null,
  "environment": "live"
}'
const result = await cm.api-keys.post({
  "label": "string",
  "description": "string",
  "permissions": [],
  "allowedSchemas": null,
  "allowedMethods": null,
  "ipAllowlist": null,
  "expiresAt": null,
  "environment": "live"
});

Antwortcodes

HTTP Bedeutung
200 Default Response

Suche