Applies to:
Summary
Goal: Export complete experiment data beyond the 1000 event limit using BTQL with cursor pagination. Features: BTQL endpoint, cursor-based pagination via x-bt-cursor header, native query format.Configuration Steps
Step 1: Understand the limitation
The/v1/experiment/{id}/fetch endpoint has a hard limit of 1000 events per request and does not support cursor pagination.
Step 2: Use BTQL endpoint for full export
The/btql endpoint supports cursor-based pagination to retrieve all experiment events.
Step 3: Extract pagination cursor from headers
The pagination cursor is returned in thex-bt-cursor response header, not in the response body.
Step 4: Pass cursor in subsequent requests
Add the cursor to thequery.cursor field in subsequent requests until x-bt-cursor header is null.
Key Differences
| Feature | /fetch endpoint | /btql endpoint |
|---|---|---|
| Max events per request | 1000 (hard limit) | 1000 (paginated) |
| Pagination support | No | Yes (cursor-based) |
| Cursor location | N/A | x-bt-cursor header |
| Query format | Simple parameters | Native BTQL format |