All Products
Search
Document Center

Cloud Monitor:BatchExport

Last Updated:Oct 26, 2026

Exports the monitoring data defined in the Cursor operation.

Operation description

Before you begin

Make sure that you have called the Cursor operation to obtain the initial Cursor.

Usage notes

This topic provides an example to export the monitoring data of the cpu_idle metric for the acs_ecs_dashboard cloud service by using an initial Cursor. A maximum of 1,000 data records are returned each time.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cms:BatchExport

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Namespace

string

Yes

The data namespace of the cloud service.

For more information about how to obtain the data namespace of a cloud service, see Cloud service monitoring metrics.

Note

This parameter must be the same as the Namespace request parameter in the Cursor operation.

acs_ecs_dashboard

Metric

string

Yes

The name of the monitoring metric for the cloud service.

For more information about how to obtain the monitoring metric name of a cloud service, see Cloud service monitoring metrics.

Note

This parameter must be the same as the Metric request parameter in the Cursor operation.

cpu_idle

Cursor

string

Yes

The cursor value. This parameter is required when you repeatedly call this operation to export data. You can obtain the Cursor value by using one of the following methods:

  • When you call this operation for the first time, you must call the Cursor operation to obtain the Cursor value. For more information, see Cursor.

  • When you call this operation again, you can obtain the Cursor value from the response of the previous call.

eyJidWNrZXRzIjo0LCJjdXJzb3IiOiIxNjQxNDU0MzIwMDAwMWUxY2YxNWY0NTU0MTliZjllYTY4OWQ2ODI1OTU1Yzc1NmZjMDQ2OTMxMzczMzM2MzUzMTMxMzEzMzM0MzMzODM5MzEzMTMwMjQyYzY5MmQ3NTY2MzYzMjY3NmI2ZjM5MzU2YjY4MzAzMTYyNzg3MTcwNjkzMTM3MjQyYyIsImN1cnNvclZlcnNpb24iOiJxdWVyeSIsImVuZFRpbWUiOjE2NDE0NTQ3OTU4MjMsImV4cG9ydEVuZFRpbWUiOjE2NDE0NTQ3OTU4MjMsImV4cG9ydFN0YXJ0VGltZSI6MTY0MTQ1NDE5NTgyMywiZXhwcmVzc1JhbmdlIjpmYWxzZSwiaGFzTmV4dCI6dHJ1ZSwiaW5wdXRNZXRyaWMiOiJDUFVVdGlsaXphdGlvbiIsImlucHV0TmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJsaW1pdCI6MTAwMCwibG9nVGltZU1vZGUiOnRydWUsIm1hdGNoZXJzIjp7ImNoYWluIjpbeyJsYWJlbCI6InVzZXJJZCIsIm9wZXJhdG9yIjoiRVFVQUxTIiwidmFsdWUiOiIxNzM2NTExMTM0Mzg5MTEwIn1dfSwibWV0cmljIjoiQ1BVVXRpbGl6YXRpb24iLCJtZXRyaWNUeXBlIjoiTUVUUklDIiwibmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJuZXh0UGtBZGFwdGVyIjp7fSwib2Zmc2V0IjowLCJwYXJlbnRVaWQiOjEyNzA2NzY2Nzk1NDY3MDQsInN0YXJ0VGltZSI6MTY0MTQ1NDE5NTgyMywic3RlcCI6LTEsInRpbWVvdXQiOjEyMCwid2luZG93Ijo2****

Length

integer

Yes

The maximum number of data records to return each time.

Valid values: 1 to 10000.

1000

Measurements

array

No

The measurements used to customize the returned data. By default, all measurements are returned.

For example, the cpu_idle monitoring metrics for the acs_ecs_dashboard cloud service have three measurement columns: Average, Maximum, and Minimum. If you want to return only the Average and Maximum columns, set the Settings of this parameter to the ["Average", "Maximum"] array.

For more information about how to obtain the measurements of the monitoring metrics for a cloud service, see the statistics column in Cloud service monitoring metrics.

string

No

The name of the measurement column.

Maximum

For more information about common request parameters, see Common parameters.

Response elements

Element

Type

Description

Example

object

None.

Message

string

The returned message.

success

Code

integer

The HTTP status code.

Note

A status code of 200 indicates success.

200

Success

boolean

Indicates whether the operation was successful. Valid values:

  • true: The operation was successful.

  • false: The operation failed.

true

RequestId

string

The request ID.

251402CD-305C-1617-808E-D8C11FC8138D

Cursor

string

The cursor used for the next call to this operation.

Note

If the return value is null, the monitoring data export is complete.

v2.5eyJidWNrZXRzIjo0LCJjdXJzb3IiOiIxNjQxNDU0ODAwMDAwMWUxY2YxNWY0NTU0MTliZjllYTY4OWQ2ODI1OTU1Yzc1NmZjMDQ2OTMxMzczMzM2MzUzMTMxMzEzMzM0MzMzODM5MzEzMTMwMjQyYzY5MmQzMjdhNjU2MjY3N2E2NjZhNzczOTY2NmM3Mjc0NjM3MzY5Njg3NDcyMjQyYyIsImN1cnNvclZlcnNpb24iOiJxdWVyeSIsImVuZFRpbWUiOjE2NDE0NTUyMzYxMTIsImV4cG9ydEVuZFRpbWUiOjE2NDE0NTUyMzYxMTIsImV4cG9ydFN0YXJ0VGltZSI6MTY0MTQ1NDYzNjExMiwiZXhwcmVzc1JhbmdlIjpmYWxzZSwiaGFzTmV4dCI6dHJ1ZSwiaW5wdXRNZXRyaWMiOiJDUFVVdGlsaXphdGlvbiIsImlucHV0TmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJsaW1pdCI6MTAwMCwibG9nVGltZU1vZGUiOnRydWUsIm1hdGNoZXJzIjp7ImNoYWluIjpbeyJsYWJlbCI6InVzZXJJZCIsIm9wZXJhdG9yIjoiRVFVQUxTIiwidmFsdWUiOiIxNzM2NTExMTM0Mzg5MTEwIn1dfSwibWV0cmljIjoiQ1BVVXRpbGl6YXRpb24iLCJtZXRyaWNUeXBlIjoiTUVUUklDIiwibmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJuZXh0UGtBZGFwdGVyIjp7fSwib2Zmc2V0IjowLCJwYXJlbnRVaWQiOjEyNzA2NzY2Nzk1NDY3MDQsInN0YXJ0VGltZSI6MTY0MTQ1NDYzNjExMiwic3RlcCI6LTEsInRpbWVvdXQiOjEyMCwid2luZG93Ijo2MH0***

Length

integer

The number of data records returned in the current call.

1000

Anchor

integer

The timestamp when the backend requested the data. A larger timestamp indicates that the exported data is closer to the current time.

1678781819000

HasNext

boolean

Indicates whether the data export is complete. Valid values:

  • true: The data export is incomplete.

  • false: The data export is complete.

true

DataResults

array

The data returned in the current call.

MetricStat

The exported data. Details:

  • Namespace: the data namespace of the cloud service, such as acs_ecs_dashboard.

  • Metric: the name of the metric for the cloud service, such as cpu_idle.

  • Timestamp: the timestamp of the monitoring data, in milliseconds. Example: 1641454680000.

  • Period: the statistical period of the monitoring data, in seconds. Example: 60.

  • Dimensions: the dimension information used to identify the monitored object (instance), such as [{"Label":"userId", "Value":"20654616023382****"}, {"Label":"InstanceId", "Value":"i-2ze2d6j5uhg20x4****"}].

  • Associated: the additional information of the monitored object (instance), such as tag information. It is a collection of key-value pairs, such as {"group":"test****", "name":"Alice"}.

  • Measurements: the measurements of the metric (multi-value mode by default), such as {"Average":60,"Maximum":85}.

  • LogTime: the time when the monitoring data was recorded, in milliseconds. For non-raw data (aggregated data), LogTime is null (NULL).

Examples

Success response

JSON format

{
  "Message": "success",
  "Code": 200,
  "Success": true,
  "RequestId": "251402CD-305C-1617-808E-D8C11FC8138D",
  "Cursor": "v2.5eyJidWNrZXRzIjo0LCJjdXJzb3IiOiIxNjQxNDU0ODAwMDAwMWUxY2YxNWY0NTU0MTliZjllYTY4OWQ2ODI1OTU1Yzc1NmZjMDQ2OTMxMzczMzM2MzUzMTMxMzEzMzM0MzMzODM5MzEzMTMwMjQyYzY5MmQzMjdhNjU2MjY3N2E2NjZhNzczOTY2NmM3Mjc0NjM3MzY5Njg3NDcyMjQyYyIsImN1cnNvclZlcnNpb24iOiJxdWVyeSIsImVuZFRpbWUiOjE2NDE0NTUyMzYxMTIsImV4cG9ydEVuZFRpbWUiOjE2NDE0NTUyMzYxMTIsImV4cG9ydFN0YXJ0VGltZSI6MTY0MTQ1NDYzNjExMiwiZXhwcmVzc1JhbmdlIjpmYWxzZSwiaGFzTmV4dCI6dHJ1ZSwiaW5wdXRNZXRyaWMiOiJDUFVVdGlsaXphdGlvbiIsImlucHV0TmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJsaW1pdCI6MTAwMCwibG9nVGltZU1vZGUiOnRydWUsIm1hdGNoZXJzIjp7ImNoYWluIjpbeyJsYWJlbCI6InVzZXJJZCIsIm9wZXJhdG9yIjoiRVFVQUxTIiwidmFsdWUiOiIxNzM2NTExMTM0Mzg5MTEwIn1dfSwibWV0cmljIjoiQ1BVVXRpbGl6YXRpb24iLCJtZXRyaWNUeXBlIjoiTUVUUklDIiwibmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJuZXh0UGtBZGFwdGVyIjp7fSwib2Zmc2V0IjowLCJwYXJlbnRVaWQiOjEyNzA2NzY2Nzk1NDY3MDQsInN0YXJ0VGltZSI6MTY0MTQ1NDYzNjExMiwic3RlcCI6LTEsInRpbWVvdXQiOjEyMCwid2luZG93Ijo2MH0***",
  "Length": 1000,
  "Anchor": 1678781819000,
  "HasNext": true,
  "DataResults": [
    {
      "Namespace": "acs_ecs_dashboard",
      "Metric": "cpu_idle",
      "Period": 60,
      "Timestamp": 1641454680000,
      "Dimensions": [
        {
          "Label": "instanceId",
          "Value": "i-dferwret*****"
        }
      ],
      "Associated": {
        "key": "{\"group\":\"test****\", \"name\":\"Alice\"}"
      },
      "Measurements": {
        "key": "{\"Average\":60,\"Maximum\":85}"
      },
      "LogTime": 1683686550073
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 %s %s
500 InternalError The request processing has failed due to some unknown error.
500 %s %s
403 %s %s
404 %s %s
503 %s %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.