Reads data from a specified topic. This operation is primarily used for debugging. For high-volume data reading, refer to the SDK documentation.
Operation description
This operation is primarily intended for debugging purposes. Do not use this operation to read large amounts of data.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dhs:GetRecords |
none |
*Topic
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The project name. |
test_project |
| TopicName |
string |
Yes |
The topic name. |
test_topic |
| ShardId |
string |
No |
The shard ID from which to read data. |
7 |
| StartTime |
integer |
No |
The start time for reading data. By default, data is read starting from 5 minutes before the current time. |
1769065251123 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
A20A7093-8FE0-058C-BE0C-3C8057D5F1A1 |
| Success |
boolean |
Indicates whether the call was successful. Valid values:
|
True |
| Records |
array<object> |
The content of the records that were read. |
|
|
array<object> |
The content of a single record. |
||
| Data |
array |
The data content of the record. |
|
|
string |
The specific DNS information of the record. Different record types contain different information. |
10 |
|
| Attributes |
object |
The additional information of the record. This value is empty if no additional information exists. |
|
|
string |
The additional information of the record. |
key:val |
|
| SystemTime |
integer |
The time when the record was written. |
1769065251123 |
Examples
Success response
JSON format
{
"RequestId": "A20A7093-8FE0-058C-BE0C-3C8057D5F1A1",
"Success": true,
"Records": [
{
"Data": [
"10"
],
"Attributes": {
"key": "key:val"
},
"SystemTime": 1769065251123
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | Error:%s. | The parameter entered is illegal |
| 400 | MissingParameter | Error:%s. | Missing required parameters |
| 500 | InternalServerError | Error:%s. | Server error, server unavailable or unexpected error occurred |
| 403 | NoPermission | Error:%s. | You are not authorized to perform this operation. |
| 403 | OperationDenied | Error:%s. | Operation denied |
| 404 | ResourceNotFound | Error:%s. | Resource does not exist |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.