> For the complete documentation index, see [llms.txt](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/provisioningstats.md).

# Provisioning Status

Retrieve live workflow task counts for a policy extraction run, overall and per workflow

The Provisioning Status API returns live counts of workflow tasks for a single policy extraction run. It powers the **Workflow Tasks stats card** on the [Provisioning Activity](/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/getting-started/activity-log.md) page, which summarizes how many tasks are scheduled, running, done, or errored for the most recent (or a selected) extraction.

**Provisioning Status API** helps you:

* Monitor the live progress of a policy run as workflow tasks move through their states
* Break down task counts per workflow within the run
* Detect stalled or errored runs without paging through individual tasks

## Endpoints

| Method | Endpoint                                            | Description                                        |
| ------ | --------------------------------------------------- | -------------------------------------------------- |
| GET    | [Get Provisioning Status](#get-provisioning-status) | Retrieve task counts for a policy's extraction run |

## Key Concepts

### Task state counts

The response reports counts both **overall** for the run and **per workflow** (keyed by workflow name in `stats_per_workflow`). Each task state maps to a count:

| Field               | Description                                                                                                                                               |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `total_tasks`       | Total number of workflow tasks created for the run                                                                                                        |
| `completed_tasks`   | Tasks that finished successfully (Done)                                                                                                                   |
| `in_progress_tasks` | Tasks currently executing (Running)                                                                                                                       |
| `pending_tasks`     | Tasks not yet started (Scheduled / Queued)                                                                                                                |
| `errored_tasks`     | Tasks that failed with an error                                                                                                                           |
| `skipped_tasks`     | Tasks skipped because they did not need to run                                                                                                            |
| `abandoned_tasks`   | Blocked tasks that were abandoned                                                                                                                         |
| `retried_tasks`     | Tasks retried after a previous attempt. Defined only in the per-workflow schema; the API does not currently populate this field, so treat it as reserved. |

The response also includes `extraction_event_id`, plus `started_at` and `completed_at` timestamps for the run.

The overall (top-level) counts exclude `retried_tasks` — retry counts are tracked per workflow only.

## Get Provisioning Status

### Endpoint

```sh
GET /api/private/lifecycle_management/policy_task_processing_status/{policy_id}/{extraction_event_id}
```

### Description

Retrieve workflow task counts for a specific policy extraction run. Both path parameters are required: `policy_id` identifies the policy, and `extraction_event_id` identifies the extraction run whose tasks you want to summarize. Use the [Extraction Events API](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/extractionevents.md) to discover recent extraction event IDs for a policy.

### API Reference

{% openapi src="/files/Aco9gj4MY2XoNiD4zIjr" path="/api/private/lifecycle\_management/policy\_task\_processing\_status/{policy\_id}/{extraction\_event\_id}" method="get" %}
[openapi.yaml](https://1967633068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZDkWMxox3pekd0NsZJ%2Fuploads%2Fgit-blob-36dc6f3613465aa5618f4e7c3e32d08da0b9b3c7%2Fopenapi.yaml?alt=media)
{% endopenapi %}

### Request Example

```bash
curl -X GET "https://your-tenant.vezacloud.com/api/private/lifecycle_management/policy_task_processing_status/policy-abc-123/ee-def-456" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

## Authentication

All Provisioning Status API requests require authentication. See [API Authentication](/4yItIzMvkpAvMVFAamTf/developers/api/authentication.md) for details.

## Related Documentation

* [Provisioning Activity](/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/getting-started/activity-log.md)
* [Extraction Events](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/extractionevents.md)
* [Extraction Runs](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/extractionruns.md)
* [Triggered Workflows](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/triggeredworkflows.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/provisioningstats.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
