Retrieves the details of a specified API key by API key name.
Operation description
Description
This operation retrieves the details of a specified API key by using
apiKeyName.The returned information includes the name, key, status, description, list of data stores that allow writes, creation time, and update time of the API key.
log:GetApiKeyis considered a sensitive permission. Exercise caution when calling this operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
log:GetApiKey |
get |
*Project
|
None | None |
Request syntax
GET /apikeys/{apiKeyName} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| apiKeyName |
string |
Yes |
The API key name. |
demo-apikey-001 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| project |
string |
No |
The project name. |
test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| apiKeyName |
string |
The API key name. |
demo-apikey-001 |
| apiKey |
string |
The API key in plaintext. |
|
| status |
string |
The status. |
Enabled / Disabled |
| description |
string |
The description. |
test |
| allowedStores |
array |
The list of Logstores that allow writes. |
|
|
string |
The Logstore name. |
test |
|
| createTime |
integer |
The creation time. |
1788420000 |
| updateTime |
integer |
The update time. |
1788420000 |
Examples
Success response
JSON format
{
"apiKeyName": "demo-apikey-001",
"apiKey": "",
"status": "Enabled / Disabled",
"description": "test",
"allowedStores": [
"test"
],
"createTime": 1788420000,
"updateTime": 1788420000
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.