- postApiIndexV1DebugDatasourceDocumentEvents - Beta: Get document lifecycle 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.
package hello.world;
import com.glean.api_client.glean_api_client.Glean;
import com.glean.api_client.glean_api_client.models.components.DebugDocumentLifecycleRequest;
import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1DebugDatasourceDocumentEventsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Glean sdk = Glean.builder()
.apiToken(System.getenv().getOrDefault("GLEAN_API_TOKEN", ""))
.build();
PostApiIndexV1DebugDatasourceDocumentEventsResponse res = sdk.troubleshooting().postApiIndexV1DebugDatasourceDocumentEvents()
.datasource("<value>")
.debugDocumentLifecycleRequest(DebugDocumentLifecycleRequest.builder()
.objectType("Article")
.docId("art123")
.startDate("2025-05-01")
.maxEvents(50L)
.build())
.call();
if (res.debugDocumentLifecycleResponse().isPresent()) {
System.out.println(res.debugDocumentLifecycleResponse().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
datasource |
String | ✔️ | The datasource to which the document belongs |
debugDocumentLifecycleRequest |
DebugDocumentLifecycleRequest | ✔️ | N/A |
PostApiIndexV1DebugDatasourceDocumentEventsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/APIException | 4XX, 5XX | */* |