---
title: "Beta: Get document lifecycle events"
method: POST
path: "/api/index/v1/debug/{datasource}/document/events"
tags: ["Troubleshooting"]
---

# Beta: Get document lifecycle events

`POST /api/index/v1/debug/{datasource}/document/events`

Retrieves lifecycle events for a specific document including upload time, index times and deletions. Rate limited to 1 request per minute per datasource. Currently in beta, might undergo breaking changes without prior notice.

## Path parameters

- `datasource` string, required

## Request body

- DebugDocumentLifecycleRequest — Describes the request body of the /debug/{datasource}/document/events API call.
  - `objectType` string, required — Object type of the document to get lifecycle events for.
  - `docId` string, required — Glean Document ID within the datasource to get lifecycle events for.
  - `startDate` string — The start date for events to be fetched. Cannot be more than 30 days (default 7 days) in the past.
  - `maxEvents` integer — Max number of events to be fetched. Cannot be more than 100 (default 20).

## Response `200`

OK

- DebugDocumentLifecycleResponse — Describes the response body of the /debug/{datasource}/document/events API call
  - `lifeCycleEvents` LifeCycleEvent[] — List of lifecycle events corresponding to the document
    - `event` 'UPLOADED' | 'INDEXED' | 'DELETION_REQUESTED' | 'DELETED' — Type of event
    - `timestamp` string — Timestamp of the event

## Other responses

- `400` — Bad Request
- `401` — Not Authorized
- `429` — Too Many Requests

---

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