---
title: "POST /v1beta/{tenantId}/metrics"
method: POST
path: "/v1beta/{tenantId}/metrics"
tags: ["Metrics"]
---

# POST /v1beta/{tenantId}/metrics

`POST /v1beta/{tenantId}/metrics`

Trigger metric collection for the specified driver.

## Request body

- CollectMetricSpec — Collect Metric spec specifies the driver to trigger collect metrics action.
  - `driverType` 'lvm' | 'ceph' | 'huawei_oceanstor_block', required

## Response `202`

Accepted

- MetricSpec — Metric spec represents metrics of different type, which has name, instanceID label, timestamp , value etc..
  - `id` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `instanceID` string
  - `instanceName` string
  - `job` string
  - `name` string, required
  - `unit` string
  - `aggrType` string
  - `metricValues` object[] — Metric values for the timestamp
    - `timestamp` integer — Timestamp of the metric
    - `value` number — Value of the metric for this timestamp
  - `labels` object

## Other responses

- `400` — BadRequest
- `401` — NotAuthorized
- `403` — Forbidden
- `500` — An unexpected error occured.

---

[API](https://skmtc.net/sodafoundation/apis/soda-api.md) · [All operations](https://skmtc.net/sodafoundation/apis/soda-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sodafoundation/soda-api/revisions/62ce0f6c94b4/schema)
