---
title: "Returns the frames for the executing BackgroundJob"
method: POST
path: "/v1/admin/background_job/stacktrace"
tags: ["Background Jobs"]
---

# Returns the frames for the executing BackgroundJob

`POST /v1/admin/background_job/stacktrace`

Get the stack trace for the executing Background Job passed in the request

## Request body

- RecordIdentity
  - `sysId` string — Unique Identifier of the tracked item
  - `lastUpdate` string, date-time — Last update of the tracked item
  - `table` string — Context of the tracked item

## Response `200`

Fetched

- BackgroundJobThread
  - `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' — Executor of the Background Job
  - `process_id` integer — ID of the process
  - `process_name` string — Name of the process
  - `thread_id` integer — ID of the thread
  - `thread_name` string — Name of the thread
  - `frames` BackgroundJobThreadFrame[] — Stack frames for the thread
    - `filename` string — Name of the file for the function
    - `lineno` integer — Number line for the function
    - `name` string — Name of the function
    - `line` string — Text of the line

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Unknown Background Job
- `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)
