Enable or Disable Resources
1. API Description
Use this API to enable or disable resources in batches.
2. API URL
POST http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/resourceVersion/updateResourcesStatus
To obtain anymetrics_host:anymetrics_port, see Calling APIs.
3. Request Parameters
3.1 Common Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| tenant-id | String | Yes | Tenant ID that identifies the tenant to which the resource belongs. |
| auth-type | String | Yes | Authentication type. Supported values: UID, TOKEN, ACCOUNT, APIKEY. |
| auth-value | String | Yes | Authentication value corresponding to auth-type. |
3.1.1 How to Obtain Common Parameters
In Aloudata CAN, select the metric application from the top navigation bar, then choose API Integration from the left navigation menu. You can obtain tenant-id on the API Integration page. Set auth-value to the authentication value required by the selected auth-type.

3.2 Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| resourceType | String | Yes | Resource type: METRIC for metric, DIMENSION for dimension. |
| resourceIds | Array |
Yes | List of resource IDs. |
| status | String | Yes | ONLINE: enable; OFFLINE: disable. |
4. Request Example
curl --location 'http://localhost:8083/anymetrics/api/v1/resourceVersion/updateResourcesStatus' \
--header 'tenant-id: tn_xxx' \
--header 'auth-value: 492376865890107392' \
--header 'auth-type: UID' \
--header 'Content-Type: application/json' \
--data '{
"resourceType": "METRIC",
"resourceIds": [
"mcd5ccd4ed7ab8d03d84d1d2e71c95a2"
],
"status": "ONLINE"
}'