ExploreHiTSDBInstanceData

Updated at:
Copy as MD

Queries time series data from a TSDB instance over a specified time range, with support for downsampling and tag-based filtering.

Request parameters

ParameterTypeRequiredDescription
RegionIdStringYesThe ID of the region where the instance resides.
InstanceIdStringYesThe ID of the TSDB instance.
ReverseIpStringYesThe reverse VPC IP address of the instance.
ReversePortIntegerYesThe reverse VPC port of the instance.
MetricStringYesThe name of the metric to query.
AggregatorStringYesThe aggregator applied to the raw data before downsampling. Valid values: count, sum, avg, min, max.
StartStringYesThe start time of the query range.
EndStringYesThe end time of the query range.
downSampleTimeStringYesThe time precision for downsampling.
downSampleAggregatorStringYesThe aggregator applied during downsampling. Valid values: count, sum, avg, min, max.
tagFilterStringYesA JSON array of tag filter objects in nested list format. Each object specifies a set of tag key-value pairs. Example: [{"city":"shanghai","host":"127.0.0.1"},{"city":"shanghai","host":"127.0.0.2"}]
Note: None of the request parameters have default values. All parameters are required.

Response elements

ParameterTypeDescription
MetricListThe name of the queried metric.
StartStringThe start time of the query range, in milliseconds.
EndStringThe end time of the query range, in milliseconds.
TimeLinesListThe list of matched time series.
TagsListThe tags associated with the time series.
TagKeyStringThe tag key.
TagValueStringThe tag value.
SeriesListThe data points in the time series.
TimestampLongThe timestamp of the data point, in milliseconds.
ValueDoubleThe sampled value at the corresponding timestamp.

Examples

Sample response

{
    "code": "200",
    "data": {
        "RequestId": "2553A660-E4EB-4AF4-A402-8AFF70A49143",
        "Metric": "cpu_load",
        "Start": "1365966062",
        "End": "1365966062",
        "TimeLines": [
            {
                "Tags": [
                    {
                        "TagKey": "host",
                        "TagValue": "127.0.0.1"
                    },
                    {
                        "TagKey": "city",
                        "TagValue": "shanghai"
                    }
                ],
                "Series": [
                    {
                        "Timestamp": 1495375200,
                        "Value": 5.0
                    },
                    {
                        "Timestamp": 1495375500,
                        "Value": 5.1
                    },
                    {
                        "Timestamp": 1495375800,
                        "Value": 5.2
                    }
                ]
            }
        ]
    },
    "requestId": "5EE70BFD-A272-417C-A6C2-37F081A49FE3",
    "successResponse": true
}