Creates an ApiKey resource in a specified project.
Operation description
Description
A maximum of 10 ApiKeys can be created in each project.
The
apiKeyNamemust be unique within the project and cannot be modified after creation.The
allowedStoresfield cannot be empty and supports wildcard matching.The system automatically generates the ApiKey plaintext during creation. You cannot customize it.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
log:CreateApiKey |
create |
*Project
|
None | None |
Request syntax
POST /apikeys HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
Yes |
The request body. |
|
| apiKeyName |
string |
No |
The API key name. |
demo-apikey-001 |
| description |
string |
No |
The description. |
test |
| allowedStores |
array |
No |
The list of Logstores that the API key is allowed to write to. |
|
|
string |
No |
The Logstore name. |
test |
|
| project |
string |
No |
The project name. |
test |
Response elements
|
Element |
Type |
Description |
Example |
None defined.
Examples
Success response
JSON format
{}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.