---
title: "POST /metric"
method: POST
path: "/metric"
---

# POST /metric

`POST /metric`

Edit metric meta info

## Query parameters

- `s` string, required

## Request body

- MetricInfo
  - `metric` MetricMetaValue, required
    - `metric_id` number
    - `namespace_id` integer, required
    - `name` string, required
    - `description` string
    - `tags` MetricMetaTag[]
      - `name` string
      - `description` string
      - `raw` boolean
      - `raw_kind` 'uint' | 'hex' | 'hex_bswap' | 'timestamp' | 'timestamp_local' | 'ip' | 'ip_bswap' | 'lexenc_float' | 'float' | 'int64' | 'uint64'
      - `id2value` object
      - `value_comments` object
    - `visible` boolean
    - `disable` boolean
    - `kind` 'counter' | 'value' | 'value_p' | 'unique' | 'mixed' | 'mixed_p', required
    - `weight` number
    - `resolution` number
    - `string_top_name` string
    - `string_top_description` string
    - `pre_key_tag_id` string
    - `pre_key_from` number
    - `update_time` number
    - `version` number
    - `group_id` number
    - `pre_key_only` boolean
    - `metric_type` string, required
    - `tags_draft` object
    - `fair_key_tag_ids` string[]

## Response `200`

OK

- object
  - `data` MetricInfo, required
    - `metric` MetricMetaValue, required
      - `metric_id` number
      - `namespace_id` integer, required
      - `name` string, required
      - `description` string
      - `tags` MetricMetaTag[]
        - `name` string
        - `description` string
        - `raw` boolean
        - `raw_kind` 'uint' | 'hex' | 'hex_bswap' | 'timestamp' | 'timestamp_local' | 'ip' | 'ip_bswap' | 'lexenc_float' | 'float' | 'int64' | 'uint64'
        - `id2value` object
        - `value_comments` object
      - `visible` boolean
      - `disable` boolean
      - `kind` 'counter' | 'value' | 'value_p' | 'unique' | 'mixed' | 'mixed_p', required
      - `weight` number
      - `resolution` number
      - `string_top_name` string
      - `string_top_description` string
      - `pre_key_tag_id` string
      - `pre_key_from` number
      - `update_time` number
      - `version` number
      - `group_id` number
      - `pre_key_only` boolean
      - `metric_type` string, required
      - `tags_draft` object
      - `fair_key_tag_ids` string[]

## Changes

- **2025-02-10** `7d617542023c` — 6 info
  - request property `metric/tags/items/raw` deprecated
  - request property `metric/tags_draft/additionalProperties/raw` deprecated
  - request property `metric/visible` deprecated
  - response property `data/metric/tags/items/raw` deprecated
  - …2 more
- **2025-02-07** `d3febc566c79` — 2 info
  - added the new optional request property `metric/disable`
  - added the optional property `data/metric/disable` to the response with the `200` status
- **2025-02-03** `572a33671f05` — 4 warning, 4 info
  - added the new `int64` enum value to the `data/metric/tags/items/raw_kind` response property for the response status `200`
  - added the new `int64` enum value to the `data/metric/tags_draft/additionalProperties/raw_kind` response property for the response status `200`
  - added the new `uint64` enum value to the `data/metric/tags/items/raw_kind` response property for the response status `200`
  - added the new `uint64` enum value to the `data/metric/tags_draft/additionalProperties/raw_kind` response property for the response status `200`
  - …4 more
- …earlier changes not shown

[Full history](https://skmtc.dev/vkcom/apis/statshouse-openapi-3-0/changes/metric/post.md)

---

[API](https://skmtc.dev/vkcom/apis/statshouse-openapi-3-0.md) · [All operations](https://skmtc.dev/vkcom/apis/statshouse-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vkcom/statshouse-openapi-3-0/revisions/96b7f6a554e9/schema)
