Crunch REST APIs

API documentation for resource management: catalogs, tables, actions, managed tables, policies, activities, users, and system configuration.

Overview

Crunch REST APIs for resource management provide a set of endpoints that let you programmatically interact with catalogs, tables, actions, managed tables, policies, activities, users, and system configuration.

These REST APIs support:

  • Catalog Discovery โ€” List catalogs (e.g. Iceberg, Delta Lake), namespaces, and tables.
  • Table Actions โ€” List and trigger actions (expire snapshots, compact, etc.) at the catalog table level.
  • Managed Table Onboarding โ€” Create policies to onboard a catalog, a prefix, or a table (tables inherit default policy unless an explicit table-level policy exists).
  • Managed Table Discovery โ€” List and inspect managed tables (tables with at least one policy) and optimization opportunities.
  • Managed Table Policies โ€” List, get, delete, and enable/disable policies on managed tables.
  • Table Activities โ€” View and retry runs (policy- or action-triggered) for catalog tables.
  • Metrics โ€” Time-series metrics (DUM, bytes crunched, DRR, etc.).
  • Users โ€” User and role management.
  • System Config โ€” System-wide configuration.

Requirements

To use the Crunch REST APIs you need:

  • A way to send REST requests (e.g. Postman, curl, or an HTTP client in your language).
  • Valid authentication credentials for the API.

Suggested tools

  • Postman
  • curl
  • Any HTTP client in your preferred programming language

Catalog Discovery APIs

Discover catalogs, namespaces, and tables. Many customers use both Iceberg and Delta Lake.

List catalogs

GET /api/v1/catalogs
List all catalogs used by customers.

Path Parameters
ParameterDescription
โ€”This endpoint does not use path parameters.
Query Parameters
ParameterDescription
โ€”This endpoint does not use query parameters.
Response
CodeDescription
200Successful response; returns list of catalogs.
4xx / 5xxError response (e.g. unauthorized, server error).

List namespaces

GET /api/v1/catalogs/{catalog_id}/namespaces
List all namespaces in a tree structure for filtering. Nesting can have an arbitrary number of levels (e.g. bucket/gold_warehouse/risk/staging/test_data/tablename_1).

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
Query Parameters
ParameterDescription
prefixFilter namespaces by prefix.
page_sizeMaximum number of items to return per page.
Response
CodeDescription
200Successful response; returns list of namespaces.
4xx / 5xxError response.

List tables in catalog

GET /api/v1/catalogs/{catalog_id}/tables
List tables in a catalog. Use type and prefix to narrow the list. Use q for wildcard matching on table names.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
Query Parameters
ParameterDescription
qWildcard pattern to match table names.
prefixFilter tables by namespace prefix.
typeFilter by table type.
page_sizeMaximum number of items to return per page.
Response
CodeDescription
200Successful response; returns list of tables.
4xx / 5xxError response.

Get table details (catalog)

GET /api/v1/catalogs/{catalog_id}/tables/{table_id}
Get table details and metadata from a catalog.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
table_idIdentifier for the table.
Query Parameters
ParameterDescription
โ€”This endpoint does not use query parameters.
Response
CodeDescription
200Successful response; returns table details and metadata.
4xx / 5xxError response (e.g. not found).

Table Action APIs

List, trigger, and manage actions for a table in a catalog. Supported actions can vary by table (e.g. Hive vs. Iceberg, partitioned vs. non-partitioned).

List actions

GET /api/v1/catalogs/{catalog_id}/tables/{table_id}/actions
List all actions supported by the platform (e.g. expire snapshots and vacuum, expire partitions, compress, compact, improve layout). Actions can vary by table type (Hive vs. Iceberg), partitioning, etc.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
table_idIdentifier for the table.
Query Parameters
ParameterDescription
โ€”This endpoint does not use query parameters.
Response
CodeDescription
200Successful response; returns list of supported actions.
4xx / 5xxError response.

Trigger/schedule actions

POST /api/v1/catalogs/{catalog_id}/tables/{table_id}/actions
Trigger or schedule actions for the table.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
table_idIdentifier for the table.
Query Parameters
ParameterDescription
โ€”Request body specifies action and schedule.
Response
CodeDescription
200 / 202Successfully accepted or completed the request.
4xx / 5xxError response.

Get action details

GET /api/v1/catalogs/{catalog_id}/tables/{table_id}/actions/{action_id}
Get action details.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
table_idIdentifier for the table.
action_idIdentifier for the action.
Response
CodeDescription
200Successful response; returns action details.
4xx / 5xxError response.

Retry action

POST /api/v1/catalogs/{catalog_id}/tables/{table_id}/actions/{action_id}
Retry an action.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
table_idIdentifier for the table.
action_idIdentifier for the action to retry.
Response
CodeDescription
200 / 202Successfully accepted or completed the retry.
4xx / 5xxError response.

Managed Table Onboarding APIs

Onboarding is done by creating policies. Create a policy at catalog level (default for entire catalog), at prefix level (default for that prefix), or at table level. All tables within a default policy scope inherit that policy unless an explicit table-level policy exists.

Create policy (catalog / prefix / table)

POST /api/v1/catalogs/{catalog_id}/policies
Create a default policy for a prefix of the catalog (onboard prefix). All tables under that prefix inherit this policy by default.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
Query Parameters
ParameterDescription
prefixNamespace prefix to which the default policy applies.
Response
CodeDescription
200 / 201Successfully created the policy.
4xx / 5xxError response.

POST /api/v1/catalogs/{catalog_id}/tables/{table_id}/policies
Create a policy for a specific table (onboard table). This is an explicit table-level policy.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
table_idIdentifier for the table.
Response
CodeDescription
200 / 201Successfully created the table-level policy.
4xx / 5xxError response.

Managed Table Discovery APIs

Managed tables are tables with at least one policy.

List managed tables

GET /api/v1/managedtables
List all managed tables (tables with at least one policy).

Path Parameters
ParameterDescription
โ€”This endpoint does not use path parameters.
Query Parameters
ParameterDescription
qFilter or search by pattern (e.g. wildcard on table name).
page_sizeMaximum number of items to return per page.
Response
CodeDescription
200Successful response; returns list of managed tables.
4xx / 5xxError response.

Get managed table detail

GET /api/v1/managedtables/{table_id}
Get managed table detail, including opportunities (e.g. potential DRR, missing ordering, small files).

Path Parameters
ParameterDescription
table_idIdentifier for the managed table.
Response
CodeDescription
200Successful response; returns managed table details and opportunities.
4xx / 5xxError response (e.g. not found).

Managed Table Policy APIs

List policies

GET /api/v1/managedtables/{table_id}/policies
List policies applied to a managed table.

Path Parameters
ParameterDescription
table_idIdentifier for the managed table.
Response
CodeDescription
200Successful response; returns list of policies for the table.
4xx / 5xxError response.

Get policy

GET /api/v1/managedtables/{table_id}/policies/{policy_id}
Get a single policy by ID.

Path Parameters
ParameterDescription
table_idIdentifier for the managed table.
policy_idIdentifier for the policy.
Response
CodeDescription
200Successful response; returns policy details.
4xx / 5xxError response (e.g. not found).

Delete policy

DELETE /api/v1/managedtables/{table_id}/policies/{policy_id}
Delete a policy. If all policies are deleted for a table, the table becomes an un-managed table.

Path Parameters
ParameterDescription
table_idIdentifier for the managed table.
policy_idIdentifier for the policy to delete.
Response
CodeDescription
200 / 204Successfully deleted the policy.
4xx / 5xxError response.

Enable and disable policy

POST /api/v1/managedtables/{table_id}/policies/{policy_id}:enable
Enable a policy.

POST /api/v1/managedtables/{table_id}/policies/{policy_id}:disable
Disable a policy.

Path Parameters
ParameterDescription
table_idIdentifier for the managed table.
policy_idIdentifier for the policy to enable or disable.
Response
CodeDescription
200Successfully enabled or disabled the policy.
4xx / 5xxError response.

Table Activities APIs

Activity history for a table in a catalog, including policy-triggered and manual runs.

List activity history

GET /api/v1/catalogs/{catalog_id}/tables/{table_id}/runs
Get activity history for a table, including both policy-triggered and manual runs.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
table_idIdentifier for the table.
Query Parameters
ParameterDescription
startStart of time range for filtering runs.
endEnd of time range for filtering runs.
statusFilter by run status.
triggerFilter by trigger type: POLICY or ACTION.
page_sizeMaximum number of items to return per page.
Response
CodeDescription
200Successful response; returns list of runs.
4xx / 5xxError response.

Get run detail

GET /api/v1/catalogs/{catalog_id}/tables/{table_id}/runs/{run_id}
Get activity run detail.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
table_idIdentifier for the table.
run_idIdentifier for the run.
Response
CodeDescription
200Successful response; returns run details.
4xx / 5xxError response (e.g. not found).

Retry/rerun activity

POST /api/v1/catalogs/{catalog_id}/tables/{table_id}/runs/{run_id}
Retry or rerun an activity.

Path Parameters
ParameterDescription
catalog_idIdentifier for the catalog.
table_idIdentifier for the table.
run_idIdentifier for the run to retry.
Response
CodeDescription
200 / 202Successfully accepted or completed the retry.
4xx / 5xxError response.

Metrics APIs

Time-series metrics such as DUM, bytes crunched, partitions crunched, files reduced, DRR, partitions deleted, bytes deleted, query speed improvements, query failure reduction rate, etc.

Note: Design decision โ€” build custom APIs vs. leverage APIs provided by existing metric tech stack. Endpoints to be defined.


User APIs

List users

GET /api/v1/users
List users.

Path Parameters
ParameterDescription
โ€”This endpoint does not use path parameters.
Response
CodeDescription
200Successful response; returns list of users.
4xx / 5xxError response.

Get user details

GET /api/v1/users/{user_id}
Get user details.

Path Parameters
ParameterDescription
user_idIdentifier for the user.
Response
CodeDescription
200Successful response; returns user details.
4xx / 5xxError response (e.g. not found).

Create user

POST /api/v1/users
Create a new user.

Path Parameters
ParameterDescription
โ€”User details in request body.
Response
CodeDescription
200 / 201Successfully created the user.
4xx / 5xxError response.

Delete user

DELETE /api/v1/users/{user_id}
Delete a user.

Path Parameters
ParameterDescription
user_idIdentifier for the user to delete.
Response
CodeDescription
200 / 204Successfully deleted the user.
4xx / 5xxError response.

Get user roles

GET /api/v1/users/{user_id}/roles
Get roles assigned to a user.

Path Parameters
ParameterDescription
user_idIdentifier for the user.
Response
CodeDescription
200Successful response; returns list of roles for the user.
4xx / 5xxError response.

Revoke user roles

DELETE /api/v1/users/{user_id}/roles
Revoke user roles. Roles to revoke are specified in the request body.

Path Parameters
ParameterDescription
user_idIdentifier for the user.
Response
CodeDescription
200 / 204Successfully revoked the specified roles.
4xx / 5xxError response.

System Config API

Get system configuration

GET /api/v1/config
Get system configuration (e.g. email addresses, Slack webhooks, minimum table size to qualify for optimization, minimum existence days for tables to qualify, default policy values such as 30 days for partition expiration).

Path Parameters
ParameterDescription
โ€”This endpoint does not use path parameters.
Response
CodeDescription
200Successful response; returns system configuration.
4xx / 5xxError response.

Update system configuration

POST /api/v1/config
Update system configuration. Configuration in request body.

Path Parameters
ParameterDescription
โ€”Configuration in request body.
Response
CodeDescription
200Successfully updated system configuration.
4xx / 5xxError response.