---
title: "Provides detailed PMAPI metric metadata"
method: GET
path: "/pmapi/metric"
tags: ["PMAPI HOST SERVICES"]
---

# Provides detailed PMAPI metric metadata

`GET /pmapi/metric`

The *metric* endpoint provides detailed PMAPI metric metadata for one or more metrics. If no parameters are supplied, the response will be for 
all metrics found when traversing the entire Performance Metrics Name Space (PMNS).

The *prefix* parameter can be used to specify a subtree of the PMNS for traversal. Alternatively, a specific metric or comma-separated list of 
metrics can be specified using either *name* or *names*.

The server response is a JSON document that provides metric metadata as an array.
```
$ curl -s http://localhost:44322/pmapi/metric?names=kernel.all.load,disk.all.read | pmjson
```
Most of the fields are directly transcribed from the PMAPI calls for metric descriptors, labels and help text mentioned above and are exactly as 
would be observed using the [pminfo](https://man7.org/linux/man-pages/man1/pminfo.1.html)(1) command with the - **dlmstT** options.

The semantics, type and units fields are as returned by [pmTypeStr](https://man7.org/linux/man-pages/man3/pmTypeStr.3.html)(3), 
[pmUnitsStr](https://man7.org/linux/man-pages/man3/pmUnitsStr.3.html)(3) and [pmSemStr](https://man7.org/linux/man-pages/man3/pmSemStr.3.html)(3).

**Reference:** [pmLookupDesc](https://man7.org/linux/man-pages/man3/pmLookupDesc.3.html)(3),
               [pmLookupLabels](https://man7.org/linux/man-pages/man3/pmLookupLabels.3.html)(3),
               [pmLookupName](https://man7.org/linux/man-pages/man3/pmLookupName.3.html)(3),
               [pmLookupText](https://man7.org/linux/man-pages/man3/pmLookupText.3.html)(3)

## Query parameters

- `name` string
- `names` string
- `pmid` unknown
- `pmids` string
- `prefix` string
- `hostspec` string
- `context` number
- `polltimeout` number
- `client` string

## Response `200`

OK

## Changes

> 16 revisions in range; 4 could not be searched.

- **2020-10-21** `26cabf98ddfb` — 1 info
  - endpoint added
- **2020-10-20** `7da0633fad91` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/performancecopilot/apis/pmwebapi/changes/pmapi/metric/get.md)

---

[API](https://skmtc.dev/performancecopilot/apis/pmwebapi.md) · [All operations](https://skmtc.dev/performancecopilot/apis/pmwebapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/performancecopilot/pmwebapi/revisions/666212c8ed6b/schema)
