最近更新时间:2023.11.13 16:31:26
首次发布时间:2022.05.11 11:26:47
调用 DescribeTopics 接口获取日志项目的所有日志主题信息。
此接口用于查看指定日志项目下的日志主题列表。支持分页查询、按偏移量查询、按日志主题名称和 ID 模糊查询。
此接口的调用频率限制为 20 次/s,超出频率限制会报错 ExceedQPSLimit。
请求方法 | GET |
---|---|
URI |
|
传输协议 | HTTPS |
参数 | 参数类型 | 是否必选 | 示例值 | 说明 |
---|---|---|---|---|
ProjectId | String | 必选 | 6********** | 日志项目 ID。 |
PageNumber | Integer | 可选 | 1 | 分页查询时的页码。默认为 1,即从第一页数据开始返回。 |
PageSize | Integer | 可选 | 10 | 分页大小。默认为 20,最大为 100。 |
TopicName | String | 可选 | tes | 日志主题名称,支持模糊匹配。 说明 不支持同时指定 TopicName 和 TopicId。 |
IsFullName | Boolean | 可选 | true | 根据 TopicName 筛选时,是否精确匹配。
|
TopicId | String | 可选 | 77 | 日志主题 ID,支持模糊匹配。 说明 不支持同时指定 TopicName 和 TopicId。 |
Tags | Array of TagInfo | 可选 | [{"Key":"key1","Value":"value1"}] |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Topic | Array of TopicInfo | / | 日志主题列表。详细信息请参考 TopicInfo。 |
Total | Integer | 2 | 日志主题数量。 |
GET https://tls-{Region}.ivolces.com/DescribeTopics?ProjectId=662***&PageNumber=1&PageSize=10&TopicName=tes&IsFullName=false&Tags=[{"Key":"key1","Value":"value1"}] HTTP/1.1
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 ... { "Total": 2, "Topic": [ { "TopicName": "test17-3", "ProjectId": "c7e0********", "TopicId": "b80f********", "Ttl": 1023, "CreateTime": "2021-08-19 11:41:29", "ModifyTime": "2021-08-19 11:41:32", "ShardCount": 2, "Description": "test that this is a test s", "AutoSplit":true, "MaxSplitShard":10, "EnableTracking":false, "TimeKey": "request_time", "TimeFormat": "%Y-%m-%dT%H:%M:%S,%f", "LogPublicIP": false, "Tags":[ { "Key":"key1", "Value":"value1" } ] }, { "TopicName": "test17-2", "ProjectId": "c7e0*********", "TopicId": "bcb2*********", "Ttl": 1023, "CreateTime": "2021-08-19 10:43:13", "ModifyTime": "2021-08-19 10:43:16", "ShardCount": 2, "Description": "test that this is a test s", "AutoSplit":true, "MaxSplitShard":10, "EnableTracking":false, "TimeKey": "request_time", "TimeFormat": "%Y-%m-%dT%H:%M:%S,%f", "Tags":[ { "Key":"key1", "Value":"value1" } ] } ] }
错误码(Code) | HTTP 状态码 | 错误信息(Message) | 说明 |
---|---|---|---|
InvalidArgument | 400 | Invalid argument key %s, value %s, please check argument. | 参数不合法。 |
TopicNotExist | 404 | topic %s does not exist. | 日志主题不存在。 |
InternalServerError | 500 | We encountered an unexpected server error, please try again later. | 服务器内部错误。 |
更多信息,请参考通用错误码。