---
title: "Ingest pod metrics for adaptive classification"
method: POST
path: "/api/v1/metrics"
tags: ["PodSchedulingMetrics"]
---

# Ingest pod metrics for adaptive classification

`POST /api/v1/metrics`

Accept periodic pod scheduling metrics and update adaptive clustering state.

## Request body

- RestIngestMetricsRequest
  - `metrics` RestMetricsPayload
    - `cpu_time` integer
    - `invol_ctx_sw` integer
    - `l3_migr` integer
    - `numa_migr` integer
    - `run_count` integer
    - `smt_migr` integer
    - `vol_ctx_sw` integer
    - `wait_time` integer
  - `namespace` string
  - `node` string
  - `pod` string
  - `timestamp` integer

## Response `200`

OK

- GithubComGthulhuApiManagerRestSuccessResponseRestClassifyResponseItem
  - `data` RestClassifyResponseItem
    - `classification` RestClassifyResult
      - `confidence` number
      - `current_type` string[] — type clould be cpu_heavy, balanced, needs_higher_priority, interactive cache_unfriendly, numa_unfriendly, or scheduling_latency
      - `previous_type` string[]
    - `drift` RestClassifyDrift
      - `drift_confirmed_periods` integer
      - `drift_score` number
    - `namespace` string
    - `node` string
    - `phase` 'cold_start' | 'warming_up' | 'stable' | 'drifting' | 'transitioning'
    - `pod` string
    - `profile` RestClassifyProfile
      - `long_term_baseline` object
      - `short_term` object
    - `recommendation` RestClassifyRecommendation
      - `action` string
      - `priority_class` string
      - `reason` string
    - `updated_at` integer
  - `success` boolean
  - `timestamp` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/gthulhu/apis/manager-service.md) · [All operations](https://skmtc.net/gthulhu/apis/manager-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gthulhu/manager-service/revisions/a72e72a0d984/schema)
