POST /v1/api-keys
POST/v1/api-keys
Create a new API key. The plaintext token is returned exactly once.
Request Body
| Name | Typ | Beschreibung |
|---|
labelerforderlich | string | |
description | string | |
permissions | string[] | |
allowedSchemas | arraynull | |
allowedMethods | arraynull | |
ipAllowlist | arraynull | |
expiresAt | string,null<date-time> | |
environment | string | |
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 |