查询时序库。
接口说明
时序库可用于存储时序数据。 此接口仅用于查询时序库的配置,若要查询时序库中的时序数据,可参见查询与分析以及 GetLogsV2 。
- 此接口需要指定一个已存在的时序库。 
- 请求语法中的 Host 由 Project 名称和日志服务 Endpoint 构成,您需要在 Host 中指定 Project。 
- 已创建并获取 AccessKey。更多信息,请参见访问密钥。 
阿里云账号 AccessKey 拥有所有 API 的访问权限,风险很高。强烈建议您创建并使用 RAM 用户进行 API 访问或日常运维。RAM 用户需具备操作日志服务资源的权限。具体操作,请参见创建 RAM 用户及授权。
- 
已明确您查询日志所属的 Project 名称、所属地域等信息。如何查询,请参见管理 Project。 
- 
一个 Project 中,最多创建 200 个 Logstore 或 MetricStore。 
- 
当时序数据保存时间达到您所设置的数据保存时间后,数据将被删除。 
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
 调试
        
            调试
        
    
授权信息
请求语法
GET /metricstores/{name} HTTP/1.1请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
| name | string | 是 | 时序库名称 | my_metric_store | 
返回参数
| 名称 | 类型 | 描述 | 示例值 | 
| headers | object | ||
| Server | string | nginx | |
| Content-Type | string | application/json | |
| Content-Length | string | 0 | |
| Connection | string | close | |
| Date | string | Sun, 27 May 2018 08:25:04 GMT | |
| x-log-requestid | string | 5B0A6B60BB6EE39764D458B5 | |
| object | 返回结构体 | ||
| name | string | 时序库名称 | my_metric_store | 
| ttl | integer | 保存时间,单位为天 | 7 | 
| shardCount | integer | shard 分片数量 | 2 | 
| autoSplit | boolean | 是否开启自动分裂 | true | 
| maxSplitShard | integer | shard 最大自动分裂数量 | 64 | 
| mode | string | 时序库规格类型,例如 standard | standard | 
| metricType | string | 时序库种类,例如 prometheus | prometheus | 
| createTime | integer | 创建时间,unix 时间戳 | 1698933894 | 
| lastModifyTime | integer | 最后更新时间,unix 时间戳 | 1712023974 | 
| hot_ttl | integer | 数据在热存储层中的存储时间,单位为天。 | |
| infrequentAccessTTL | integer | 低频存储,单位为天。 | 
示例
正常返回示例
JSON格式
{
  "name": "my_metric_store",
  "ttl": 7,
  "shardCount": 2,
  "autoSplit": true,
  "maxSplitShard": 64,
  "mode": "standard",
  "metricType": "prometheus",
  "createTime": 1698933894,
  "lastModifyTime": 1712023974,
  "hot_ttl": 0,
  "infrequentAccessTTL": 0
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 404 | MetricStoreNotExist | The specified metricstore xxx does not exist. | 参数中所指定的时序库不存在 | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。