---
title: "Returns statistics about the selected executors"
method: POST
path: "/v1/admin/background_job/stats"
tags: ["Background Jobs"]
---

# Returns statistics about the selected executors

`POST /v1/admin/background_job/stats`

Get statistics from all Background Jobs workers.

## Request body

- BackgroundJobStatisticsRequest
  - `executor` 'AI' | 'AI_AGENT' | 'AI_BG' | 'BROKER' | 'COMPLIANCE' | 'COST' | 'COST_BG' | 'COST_BG_CLOUD_BILLING' | 'COST_BG_K8S_BILLING' | 'FEATURE_FLAGS' | 'GOVERNANCE' | 'HEATSTACK' | 'HEATSTACK_BG' | 'IDENTITY' | 'IDENTITY_BG' | 'OPERATIONS' | 'REPORT_GENERATION' | 'RESOURCE_INVENTORY' | 'RESOURCE_INVENTORY_BG' | 'SECURITY' — Filter to threads in this executor
  - `include_invalidations` boolean — If true, invalidation counters will be returned
  - `include_query_counters` boolean — If true, query counters will be returned
  - `include_query_counters_per_caller` string — If set, query counters per caller will be returned for the selected context
  - `trigger_heap_analysis` boolean — If true, a new heap analysis is started
  - `include_heap_analysis` boolean — If true, the historical heap analysis will be returned

## Response `200`

Generated

- BackgroundJobStatisticsResponse
  - `workers` object — Map from identifier to service statistics model

## Other responses

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

---

[API](https://skmtc.dev/corestack/apis/corestack-external-api.md) · [All operations](https://skmtc.dev/corestack/apis/corestack-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corestack/corestack-external-api/revisions/bf2cdf20826d/schema)
