Retrieves a key's value from a namespace in edge KV storage.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Namespace |
string |
Yes |
The namespace name specified in the CreateKvNamespace operation. |
test_namespace |
| Key |
string |
Yes |
The name of the key to query. |
test_key |
| Base64 |
boolean |
No |
Whether to Base64-decode the value. Set to true if you set Base64 to true when calling PutKv to retrieve the original content. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Value |
string |
The value of the key. |
test_value |
| RequestId |
string |
The request ID. |
EEEBE525-F576-1196-8DAF-2D70CA3F4D2F |
Examples
Success response
JSON format
{
"Value": "test_value",
"RequestId": "EEEBE525-F576-1196-8DAF-2D70CA3F4D2F"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidAccount.Malformed | The specified account is invalid. | The account is invalid, for example, the value is empty. |
| 400 | InvalidNameSpace.Malformed | The specified namespace is invalid. | The namespace name is invalid, for example, the value is empty. |
| 400 | InvalidKey.Malformed | The specified key is invalid. | The key name is invalid, for example, the value is empty. |
| 400 | InvalidKey.ExceedsMaximum | The size of the key cannot exceed 512 bytes. | The key exceeds the 512-byte size limit. |
| 400 | InvalidValue.ExceedsMaximum | The size of the value cannot exceed 2,000,000 bytes. | The value exceeds the 2,000,000-byte size limit. |
| 400 | InvalidParameters | The specified parameters are invalid. | The request contains invalid parameters. |
| 403 | InvalidKey.ExceedsCapacity | The maximum capacity of a single namespace cannot exceed 1 GB. | The namespace exceeds the 1 GB capacity limit. |
| 403 | Unauthorized.InvalidParameters | The specified authentication parameters are invalid. | The authentication parameters are invalid. |
| 403 | Unauthorized.InvalidTime | The specified authentication time is invalid. | The authentication time is invalid. Verify and retry. |
| 403 | Unauthorized.InvalidToken | Token authentication failed. | The token is invalid. Provide a valid token and retry. |
| 404 | InvalidAccount.NotFound | The specified account does not exist. | The specified account does not exist. |
| 404 | InvalidNameSpace.NotFound | The specified namespace does not exist. | |
| 404 | InvalidKey.NotFound | The specified key does not exist. | The specified key-value pair does not exist. |
| 406 | InvalidNameSpace.Duplicate | The specified namespace already exists. | The namespace already exists. |
| 406 | InvalidNameSpace.QuotaFull | The maximum number of namespaces is exceeded. | The number of namespaces exceeds the quota limit. |
| 429 | TooManyRequests | Too many requests are submitted. | Too many requests. Try again later. |
| 429 | TooQuickRequests | Request for putting or deleting keys are frequently submitted. | Key put or delete requests are too frequent. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.