> 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/extractionevents.md).

# Extraction Events

List extraction events consumed by lifecycle management policies, with filtering and pagination

An extraction event represents a single data extraction (or access plan) that a lifecycle management policy consumed to evaluate identities and run workflows. The Extraction Events API lists these events and powers the **Recent Extractions** filter on the [Provisioning Activity](/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/getting-started/activity-log.md) page, which lets operators scope the view to a specific run.

**Extraction Events API** helps you:

* List recent extractions for a policy or datasource, most recent first
* Find the `extraction_event_id` to pass to the [Provisioning Status API](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/provisioningstats.md)
* Filter extractions by policy, datasource, provider, state, or time

## Endpoints

| Method | Endpoint                                          | Description                                    |
| ------ | ------------------------------------------------- | ---------------------------------------------- |
| GET    | [List Extraction Events](#list-extraction-events) | Retrieve a paginated list of extraction events |

## List Extraction Events

### Endpoint

```sh
GET /api/private/lifecycle_management/extraction_events
```

### Description

Retrieve a paginated list of extraction events. Supports SCIM-style filtering, ordering, and pagination. To reproduce the **Recent Extractions** picker, order by `extracted_at` descending and use a small `page_size`.

### Filterable Fields

| Field            | Operators      | Description                                               |
| ---------------- | -------------- | --------------------------------------------------------- |
| `policy_id`      | eq             | Policy that consumed the extraction                       |
| `data_source_id` | eq             | Source datasource ID                                      |
| `provider_id`    | eq             | Provider ID                                               |
| `provider_type`  | eq             | Provider type                                             |
| `agent_type`     | eq             | Agent type that produced the extraction                   |
| `state`          | eq             | Extraction event state                                    |
| `event_type`     | eq             | How the event was started (`EXTRACTION` or `ACCESS_PLAN`) |
| `extracted_at`   | gt, ge, lt, le | Time the extraction was produced                          |
| `id`             | eq             | Extraction event ID                                       |

### API Reference

{% openapi src="/files/Aco9gj4MY2XoNiD4zIjr" path="/api/private/lifecycle\_management/extraction\_events" 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 Examples

**List the five most recent extractions for a policy:**

```bash
curl -X GET "https://your-tenant.vezacloud.com/api/private/lifecycle_management/extraction_events?filter=policy_id%20eq%20%22policy-abc-123%22&order_by=extracted_at%20desc&page_size=5" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

**List extractions for a datasource:**

```bash
curl -X GET "https://your-tenant.vezacloud.com/api/private/lifecycle_management/extraction_events?filter=data_source_id%20eq%20%22ds-def-456%22" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

## Authentication

All Extraction Events 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)
* [Provisioning Status](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/provisioningstats.md)
* [Extraction Runs](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/extractionruns.md)
* [Lifecycle Events](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/events.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/extractionevents.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.
