REST API
The LakeOps REST API gives you programmatic access to everything in the platform — catalogs, tables, compaction, policies, observability, and queries. Use it to integrate LakeOps into CI/CD pipelines, scripts, or your own applications.
Base URL
Each region has its own API host. Use the host that matches the region where your organization was created.
| Region | Base URL |
|---|---|
| US East (N. Virginia) | https://api.lakeops.dev |
| EU West (Ireland) | https://api-eu.lakeops.dev |
| Asia Pacific (Mumbai) | https://api-in.lakeops.dev |
Authentication
Every request must include an API key as a Bearer token in the Authorization header. Create API keys in Organization > API Keys.
Example request
curl https://api.lakeops.dev/api/catalogs \
-H "Authorization: Bearer lk_your_api_key"api.lakeops.dev.403 Forbidden.401 Unauthorized.Response format
All responses are JSON. Successful requests return the resource directly. Errors return a JSON object with an error field:
// Success (200)
{
"catalogs": [
{ "name": "production-glue", "tableCount": 142, "totalSize": "2.4 TB", ... }
]
}
// Error (403)
{
"error": "scope 'catalogs:read' required"
}Endpoints
The API is organized by domain. Each group shows the minimum scope required.
Catalogs
catalogs:readcatalogs:write| Method | Path | Description |
|---|---|---|
GET | /api/catalogs | List all registered catalogs with table statistics |
POST | /api/catalogs | Register a new catalog |
PUT | /api/catalogs/{name} | Update a catalog's configuration |
DELETE | /api/catalogs/{name} | Remove a catalog |
GET | /api/config/catalog/{name} | Get catalog configuration and metadata |
POST | /api/refresh/catalog/{name} | Trigger a full metadata refresh for a catalog |
Tables
tables:readtables:write| Method | Path | Description |
|---|---|---|
GET | /api/search | Search and filter tables by name, catalog, namespace, or health status |
GET | /api/namespaces/{catalogName} | List root namespaces in a catalog |
GET | /api/namespaces/{catalogName}/{namespacePath} | List child namespaces under a path |
GET | /api/distribution/{catalogName}/{namespace}/{tableName} | File-size distribution and statistics for a table |
GET | /api/partition-distribution/{catalogName}/{namespace}/{tableName} | Partition-level file counts, sizes, and delete ratios |
GET | /api/table-metrics | Metrics (records, file counts, sizes) for one or more tables |
POST | /api/refresh/table/{catalogName}/{namespace}/{tableName} | Trigger a metadata refresh for a single table |
DELETE | /api/tables/{catalogName}/{namespace}/{tableName} | Delete a table |
POST | /api/tables/{catalogName}/{namespace}/{tableName}/rename | Rename a table |
PUT | /api/tables/{catalogName}/{namespace}/{tableName}/properties | Set table properties |
DELETE | /api/tables/{catalogName}/{namespace}/{tableName}/properties | Remove table properties |
Compaction
tables:write| Method | Path | Description |
|---|---|---|
POST | /api/compaction/{catalogName}/{namespace}/{tableName} | Start a compaction job for a table |
GET | /api/compaction/job/{jobId} | Check the status of a running compaction job |
Snapshot management
tables:write| Method | Path | Description |
|---|---|---|
POST | /api/tables/{catalogName}/{namespace}/{tableName}/rollback-to-snapshot | Roll back a table to a specific snapshot ID |
POST | /api/tables/{catalogName}/{namespace}/{tableName}/rollback-to-timestamp | Roll back a table to a point in time |
POST | /api/tables/{catalogName}/{namespace}/{tableName}/set-current-snapshot | Set the current snapshot for a table |
DELETE | /api/tables/{catalogName}/{namespace}/{tableName}/branches/{branchName} | Delete a table branch |
DELETE | /api/tables/{catalogName}/{namespace}/{tableName}/tags/{tagName} | Delete a table tag |
Observability
read| Method | Path | Description |
|---|---|---|
GET | /api/dashboard | Org-wide dashboard: table health, storage trends, operations count |
GET | /api/monitoring/maintenance-summary | Maintenance operation counts by type and status |
GET | /api/monitoring/maintenance-samples | Adaptive maintenance signals: needs_compaction, scores, projected triggers |
GET | /api/monitoring/operations-stats | Operations statistics and top failing tables |
GET | /api/insights/search | Search health insights by severity, type, catalog, or table |
GET | /api/insights/{catalogName}/{namespace}/{tableName} | Get insights for a specific table |
GET | /api/tables/{catalogName}/{namespace}/{tableName}/maintenance | Maintenance state for a table (compaction, expiry, rewrites, orphan cleanup) |
GET | /api/events | Search operation events across the lake |
GET | /api/events/timeline | Operation event timeline with aggregations |
GET | /api/events/storage-timeline | Storage usage timeline |
GET | /api/tables/{catalogName}/{namespace}/{tableName}/events | Operation events for a specific table |
Query
query:read| Method | Path | Description |
|---|---|---|
POST | /api/query/{catalogName} | Execute a read-only SQL query against tables in a catalog |
Policies
policies:readpolicies:write| Method | Path | Description |
|---|---|---|
GET | /api/policies | List governance policies, optionally filtered by type or catalog |
POST | /api/policies/{type} | Create a governance policy |
GET | /api/policies/{type}/{id} | Get a policy by type and ID |
PUT | /api/policies/{type}/{id} | Update a policy |
DELETE | /api/policies/{type}/{id} | Delete a policy |
GET | /api/tables/{catalogName}/{namespace}/{tableName}/policies | List policies attached to a table |
POST | /api/tables/{catalogName}/{namespace}/{tableName}/policies/{type} | Create a table-level policy |
PUT | /api/tables/{catalogName}/{namespace}/{tableName}/policies/{type}/{id} | Update a table-level policy |
POST | /api/tables/{catalogName}/{namespace}/{tableName}/policies/{type}/{id}/enable | Enable a table-level policy |
POST | /api/tables/{catalogName}/{namespace}/{tableName}/policies/{type}/{id}/disable | Disable a table-level policy |
POST | /api/tables/{catalogName}/{namespace}/{tableName}/policies/{type}/{id}/execute | Trigger immediate execution of a table-level policy |
Examples
List all catalogs
curl https://api.lakeops.dev/api/catalogs \
-H "Authorization: Bearer $LAKEOPS_API_KEY"Search tables by health status
curl "https://api.lakeops.dev/api/search?status=CRITICAL&catalog=production-glue" \
-H "Authorization: Bearer $LAKEOPS_API_KEY"Get table health insights
curl https://api.lakeops.dev/api/insights/production-glue/analytics/page_events \
-H "Authorization: Bearer $LAKEOPS_API_KEY"Trigger compaction
curl -X POST https://api.lakeops.dev/api/compaction/production-glue/analytics/page_events \
-H "Authorization: Bearer $LAKEOPS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"strategy": "BINPACK",
"targetFileSizeBytes": 536870912,
"maxConcurrentFileGroupRewrites": 5
}'Create a compaction policy
curl -X POST https://api.lakeops.dev/api/policies/COMPACT_DATA_FILES \
-H "Authorization: Bearer $LAKEOPS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "nightly-compaction",
"catalogName": "production-glue",
"schedule": "0 2 * * *",
"config": {
"strategy": "BINPACK",
"targetFileSizeBytes": 536870912
}
}'Run an ad-hoc SQL query
curl -X POST https://api.lakeops.dev/api/query/production-glue \
-H "Authorization: Bearer $LAKEOPS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sql": "SELECT COUNT(*) FROM analytics.page_events WHERE dt = '''2026-08-30'''"
}'Get the org-wide dashboard
curl https://api.lakeops.dev/api/dashboard \
-H "Authorization: Bearer $LAKEOPS_API_KEY"
# Response includes:
# - tableHealth: { healthy, warning, critical }
# - storageReclaimed, operationsCount, querySpeedGain
# - recentEvents, topInsightsGitHub Actions integration
Automate table maintenance as part of your CI/CD pipeline. Store your API key as a GitHub Actions secret and call the REST API from workflow steps.
1. Add the API key as a secret
Go to your repository's Settings > Secrets and variables > Actions and add a secret named LAKEOPS_API_KEY.
2. Example workflow
This workflow runs nightly: checks for tables with critical health status, triggers compaction on any that need it, and posts a summary to Slack.
# .github/workflows/lakeops-maintenance.yml
name: LakeOps Nightly Maintenance
on:
schedule:
- cron: "0 3 * * *" # 3 AM UTC daily
workflow_dispatch: # manual trigger
env:
LAKEOPS_API: https://api.lakeops.dev
CATALOG: production-glue
jobs:
maintain:
runs-on: ubuntu-latest
steps:
- name: Check table health
id: health
run: |
RESPONSE=$(curl -s "$LAKEOPS_API/api/search?status=CRITICAL&catalog=$CATALOG" \
-H "Authorization: Bearer ${{ secrets.LAKEOPS_API_KEY }}")
echo "critical_tables=$(echo $RESPONSE | jq '.tables | length')" >> $GITHUB_OUTPUT
echo "$RESPONSE" | jq '.tables[].name' > critical_tables.txt
- name: Trigger compaction on critical tables
if: steps.health.outputs.critical_tables > 0
run: |
while IFS= read -r table; do
table=$(echo "$table" | tr -d '"')
echo "Compacting $table..."
curl -s -X POST "$LAKEOPS_API/api/compaction/$CATALOG/${table}" \
-H "Authorization: Bearer ${{ secrets.LAKEOPS_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"strategy":"BINPACK","targetFileSizeBytes":536870912}'
done < critical_tables.txt
- name: Get dashboard summary
run: |
curl -s "$LAKEOPS_API/api/dashboard" \
-H "Authorization: Bearer ${{ secrets.LAKEOPS_API_KEY }}" | \
jq '{healthy: .tableHealth.healthy, warning: .tableHealth.warning, critical: .tableHealth.critical, storageReclaimed: .storageReclaimed}'More CI/CD patterns
Rate limits & best practices
- •Use the narrowest scope possible when creating API keys. A key that only needs to read table health should have
tables:readandread, notwrite. - •Set an expiration on keys used in CI/CD. Rotate regularly.
- •Store keys in secret managers (GitHub Secrets, AWS Secrets Manager, Vault) — never commit them to source control.
- •For high-frequency polling, prefer the
/api/dashboardendpoint over individual table queries.
Next steps
- •MCP Server Setup — connect AI agents to these same APIs via Model Context Protocol.
- •Policies — define governance rules that the API can create and manage.
- •Agentic AI — understand how AI agents interact with your data lake through LakeOps.
