---
title: "Create PodSchedulingMetrics"
method: POST
path: "/api/v1/pod-scheduling-metrics"
tags: ["PodSchedulingMetrics"]
---

# Create PodSchedulingMetrics

`POST /api/v1/pod-scheduling-metrics`

Create a new PodSchedulingMetrics resource.

## Request body

- RestCreatePSMRequest
  - `collectionIntervalSeconds` integer
  - `commandRegex` string
  - `enabled` boolean
  - `k8sNamespaces` string[]
  - `labelSelectors` RestPSMLabelSelector[]
    - `key` string
    - `value` string
  - `metrics` RestPSMMetricsDTO
    - `cpuMigrations` boolean
    - `cpuTimeNs` boolean
    - `involuntaryCtxSwitches` boolean
    - `runCount` boolean
    - `voluntaryCtxSwitches` boolean
    - `waitTimeNs` boolean
  - `scaling` RestPSMScalingDTO
    - `cooldownPeriod` integer
    - `enabled` boolean
    - `maxReplicaCount` integer
    - `metricName` string
    - `minReplicaCount` integer
    - `scaleTargetRef` RestPSMScaleTargetRefDTO
      - `apiVersion` string
      - `kind` string
      - `name` string
    - `targetValue` string

## Response `200`

OK

- GithubComGthulhuApiManagerRestSuccessResponseGithubComGthulhuApiManagerRestEmptyResponse
  - `data` GithubComGthulhuApiManagerRestEmptyResponse
  - `success` boolean
  - `timestamp` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[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)
