API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console

POST /v1/api-keys

POST/v1/api-keys

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

Corps de la requête

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

Exemple

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"
});

Codes de réponse

HTTP Signification
200 Default Response

Recherche