forked from docs/doc-exports
Reviewed-by: Ziuzko, Stanislav <stanislav.ziuzko@t-systems.com> Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Liu, Siying <liusiying@noreply.gitea.eco.tsi-dev.otc-service.com> Co-committed-by: Liu, Siying <liusiying@noreply.gitea.eco.tsi-dev.otc-service.com>
493 lines
27 KiB
HTML
493 lines
27 KiB
HTML
<a name="ListSample"></a><a name="ListSample"></a>
|
||
|
||
<h1 class="topictitle1">Querying Time Series Data</h1>
|
||
<div><div class="section"><h4 class="sectiontitle">Function</h4><p>This API is used to query time series data within a specified time period. You can specify a dimension or period to query. </p>
|
||
</div>
|
||
<div class="section" id="ListSample__atuogenerate_1"><h4 class="sectiontitle">URI</h4><p>POST /v2/{project_id}/samples</p>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p>Mandatory</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p>project_id</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p>Yes</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p>Project ID obtained from IAM. Generally, a project ID contains 32 characters.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p>Mandatory</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p>fill_value</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p>No</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p>Value filled for breakpoints in time series data. Default value: –1. –1: Breakpoints are filled with –1. 0: Breakpoints are filled with 0. null: Breakpoints are filled with null. average: Breakpoints are filled with the average value of the adjacent valid data. If there is no valid data, breakpoints are filled with null.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Request Parameters</h4>
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListSample__request_QuerySampleParam" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p>Mandatory</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p>samples</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p>Yes</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p>Array of <a href="#ListSample__request_QuerySample">QuerySample</a> objects</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p>List of time series objects. A JSON array can contain up to 20 objects.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p>statistics</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p>Yes</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p>Array of strings</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p>Statistic. Values: maximum, minimum, sum, average, and sampleCount.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p>period</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p>Yes</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p>Integer</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p>Granularity for monitoring data, which is an enumerated value. Values: 60: The data monitoring granularity is 1 minute. 300: The data monitoring granularity is 5 minutes. 900: The data monitoring granularity is 15 minutes. 3600: The data monitoring granularity is 1 hour.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p>time_range</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p>Yes</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p>Time range specified to query data of the last N minutes when the client time is inconsistent with the server time. It can also be used to accurately query the data of a specified period.</p>
|
||
<p>Example:</p>
|
||
<ul><li><p>-1.-1.60: indicates that the data of the latest 60 minutes is queried. This query is based on the server time regardless of the current client time.</p>
|
||
</li><li><p>1650852000000.1650852300000.5: indicates the five minutes from 10:00:00 to 10:05:00 on April 25, 2022 GMT+08:00.</p>
|
||
</li></ul>
|
||
<p>Format:</p>
|
||
<p>startTimeInMillis.endTimeInMillis.durationInMinutes</p>
|
||
<p>Parameter description:</p>
|
||
<ul><li><p>startTimeInMillis: Start time of the query, in milliseconds. If this parameter is set to -1, the server calculates the start time as follows: endTimeInMillis – durationInMinutes x 60 x 1000. For example, -1.1650852300000.5 is equivalent to 1650852000000.1650852300000.5.</p>
|
||
</li><li><p>endTimeInMillis: End time of the query, in milliseconds. If this parameter is set to -1, the server calculates the end time as follows: startTimeInMillis + durationInMinutes x 60 x 1000. If the calculated end time is later than the current system time, the current system time is used. For example, 1650852000000.-1.5 is equivalent to 1650852000000.1650852300000.5.</p>
|
||
</li><li><p>durationInMinutes: Time span, in minutes. The value must be greater than 0 and greater than or equal to the result of "(endTimeInMillis – startTimeInMillis)/(60 x 1000) – 1". If both the start time and end time are set to -1, the system sets the end time to the current UTC time (in milliseconds) and calculates the start time as follows: endTimeInMillis – durationInMinutes x 60 x 1000. For example, -1.-1.60 indicates the latest 60 minutes.</p>
|
||
</li></ul>
|
||
<p>Constraint:</p>
|
||
<p>In a single request, the following condition must be met: durationInMinutes x 60/period ≤ 1440</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="tablenoborder"><a name="ListSample__request_QuerySample"></a><a name="request_QuerySample"></a><table cellpadding="4" cellspacing="0" summary="" id="ListSample__request_QuerySample" frame="border" border="1" rules="all"><caption><b>Table 4 </b>QuerySample</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p>Mandatory</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p>namespace</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p>Yes</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p>Namespace of time series objects. Value range: PAAS.CONTAINER, PAAS.NODE, PAAS.SLA, PAAS.AGGR, or CUSTOMMETRICS. PAAS.CONTAINER: namespace of application time series objects. PAAS.NODE: namespace of node time series objects. PAAS.SLA: namespace of SLA time series objects. PAAS.AGGR: namespace of cluster time series objects. CUSTOMMETRICS: namespace of custom time series objects.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p>dimensions</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p>Yes</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p>Array of <a href="#ListSample__request_DimensionSeries">DimensionSeries</a> objects</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p>List of time series dimensions.You can call the /v2/{project_id}/series API to query the time series dimension list by namespace and metric_name.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p>metric_name</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p>Yes</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p>Time series name. Length: 1 to 255 characters. Values: cpuUsage: CPU usage. cpuCoreUsed: used CPU cores. Custom time series names.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="tablenoborder"><a name="ListSample__request_DimensionSeries"></a><a name="request_DimensionSeries"></a><table cellpadding="4" cellspacing="0" summary="" id="ListSample__request_DimensionSeries" frame="border" border="1" rules="all"><caption><b>Table 5 </b>DimensionSeries</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p>Mandatory</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p>name</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p>No</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p>Dimension name.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p>value</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p>No</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p>Dimension value.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Response Parameters</h4><p><strong>Status code: 200</strong></p>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListSample__response_QuerySampleData" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p>samples</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p>Array of <a href="#ListSample__response_SampleDataValue">SampleDataValue</a> objects</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p>List of time series objects.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="tablenoborder"><a name="ListSample__response_SampleDataValue"></a><a name="response_SampleDataValue"></a><table cellpadding="4" cellspacing="0" summary="" id="ListSample__response_SampleDataValue" frame="border" border="1" rules="all"><caption><b>Table 7 </b>SampleDataValue</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>sample</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p><a href="#ListSample__response_QuerySample">QuerySample</a> object</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p>List of time series objects.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>data_points</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p>Array of <a href="#ListSample__response_MetricDataPoints">MetricDataPoints</a> objects</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p>Time series data.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="tablenoborder"><a name="ListSample__response_QuerySample"></a><a name="response_QuerySample"></a><table cellpadding="4" cellspacing="0" summary="" id="ListSample__response_QuerySample" frame="border" border="1" rules="all"><caption><b>Table 8 </b>QuerySample</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p>namespace</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p>Namespace of time series objects. Value range: PAAS.CONTAINER, PAAS.NODE, PAAS.SLA, PAAS.AGGR, or CUSTOMMETRICS. PAAS.CONTAINER: namespace of application time series objects. PAAS.NODE: namespace of node time series objects. PAAS.SLA: namespace of SLA time series objects. PAAS.AGGR: namespace of cluster time series objects. CUSTOMMETRICS: namespace of custom time series objects.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p>dimensions</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p>Array of <a href="#ListSample__response_DimensionSeries">DimensionSeries</a> objects</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p>List of time series dimensions.You can call the /v2/{project_id}/series API to query the time series dimension list by namespace and metric_name.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p>metric_name</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p>Time series name. Length: 1 to 255 characters. Values: cpuUsage: CPU usage. cpuCoreUsed: used CPU cores. Custom time series names.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="tablenoborder"><a name="ListSample__response_DimensionSeries"></a><a name="response_DimensionSeries"></a><table cellpadding="4" cellspacing="0" summary="" id="ListSample__response_DimensionSeries" frame="border" border="1" rules="all"><caption><b>Table 9 </b>DimensionSeries</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.2"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.6.2.4.1.3"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>name</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p>Dimension name.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>value</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p>Dimension value.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="tablenoborder"><a name="ListSample__response_MetricDataPoints"></a><a name="response_MetricDataPoints"></a><table cellpadding="4" cellspacing="0" summary="" id="ListSample__response_MetricDataPoints" frame="border" border="1" rules="all"><caption><b>Table 10 </b>MetricDataPoints</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.2"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.7.2.4.1.3"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p>statistics</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p>Array of <a href="#ListSample__response_StatisticValue">StatisticValue</a> objects</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p>Statistic.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p>timestamp</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p>Long</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p>Timestamp.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p>unit</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p>Time series unit.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="tablenoborder"><a name="ListSample__response_StatisticValue"></a><a name="response_StatisticValue"></a><table cellpadding="4" cellspacing="0" summary="" id="ListSample__response_StatisticValue" frame="border" border="1" rules="all"><caption><b>Table 11 </b>StatisticValue</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.4.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.8.2.4.1.2"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.8.2.4.1.3"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.1 "><p>statistic</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.2 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.8.2.4.1.3 "><p>Statistic.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.1 "><p>value</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.8.2.4.1.2 "><p>Double</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.8.2.4.1.3 "><p>Statistical result.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<p><strong>Status code: 400</strong></p>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListSample__response_FailedRsp" frame="border" border="1" rules="all"><caption><b>Table 12 </b>Response body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.10.2.4.1.1"><p>Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.10.2.4.1.2"><p>Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.10.2.4.1.3"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.10.2.4.1.1 "><p>error_code</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.10.2.4.1.2 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.10.2.4.1.3 "><p>Error code.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.10.2.4.1.1 "><p>error_msg</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.10.2.4.1.2 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.10.2.4.1.3 "><p>Error message.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.10.2.4.1.1 "><p>error_type</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.10.2.4.1.2 "><p>String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.10.2.4.1.3 "><p>Error type.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Example Requests</h4><p>Query time series data in the last five minutes by namespace, metric_name, and dimensions.</p>
|
||
<pre class="screen">https://{Endpoint}/v2/{project_id}/samples
|
||
|
||
{
|
||
"samples": [
|
||
{
|
||
"namespace": "PAAS.CONTAINER",
|
||
"metric_name": "aom_process_cpu_usage",
|
||
"dimensions": [
|
||
{
|
||
"name": "appName",
|
||
"value": "aomApp"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"period": 60,
|
||
"time_range": "-1.-1.5",// Last 5 minutes
|
||
"statistics": [
|
||
"sum"
|
||
]
|
||
}</pre>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Example Responses</h4><p><strong>Status code: 200</strong></p>
|
||
<p>OK: The request is successful.</p>
|
||
<pre class="screen">{
|
||
"samples" : [ {
|
||
"sample" : {
|
||
"namespace" : "PAAS.CONTAINER",
|
||
"metric_name" : "aom_process_cpu_usage",
|
||
"dimensions" : [ {
|
||
"name" : "appName",
|
||
"value" : "aomApp"
|
||
} ]
|
||
},
|
||
"data_points" : [ {
|
||
"timestamp" : "1694673300000",
|
||
"unit" : "Percent",
|
||
"statistics" : [ {
|
||
"statistic" : "sum",
|
||
"value" : "23"
|
||
} ]
|
||
} ]
|
||
} ]
|
||
}</pre>
|
||
<p><strong>Status code: 400</strong></p>
|
||
<p>Bad Request: The request is invalid. The client should not repeat the request without modifications.</p>
|
||
<pre class="screen">{
|
||
"error_code" : "AOM.04008001",
|
||
"error_msg" : "please check request param",
|
||
"error_type" : "BAD_REQUEST"
|
||
}</pre>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Status Codes</h4>
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListSample__status_code" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p>Status Code</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p>Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>200</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>OK: The request is successful.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>400</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>Bad Request: The request is invalid. The client should not repeat the request without modifications.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>401</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>Unauthorized: The authentication information is incorrect or invalid.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>403</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>Forbidden: The request is rejected. The server has received the request and understood it, but the server refuses to respond to it. The client should not repeat the request without modifications.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>500</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>Internal Server Error: The server is able to receive the request but unable to understand the request.</p>
|
||
</td>
|
||
</tr>
|
||
<tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>503</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>Service Unavailable: The requested service is invalid. The client should not repeat the request without modifications.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<div class="section"><h4 class="sectiontitle">Error Codes</h4><p>See <a href="ErrorCode.html">Error Codes</a>.</p>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="aom_04_0045.html">Monitoring</a></div>
|
||
</div>
|
||
</div>
|
||
|