Granica APIs V1

REST API reference for the Granica platform — tables, schedules, policies, crunch, vacuum, partition expiration, catalog connections, Optimus, object maintenance, and more.

Overview

The Granica REST API (v1) lets you programmatically manage the Granica platform: registering tables, setting maintenance policies and schedules, triggering crunch, vacuum, and partition-expiration runs, connecting catalogs, applying Optimus query-optimization recommendations, and managing object-storage prefixes through Object Maintenance.

Base path: /api/v1

Authentication and API keys

Programmatic clients authenticate with an API key sent as a bearer token:

Authorization: Bearer <your-api-key>

Requests go through the Granica console's API gateway, which prefixes every API path with /granica-api. For example, GET /api/v1/tables is called as:

curl -H "Authorization: Bearer $GRANICA_API_KEY" \
  https://<your-granica-console>/granica-api/api/v1/tables

The gateway authenticates the key and enforces its scopes before forwarding the request:

  • A key with no scopes has full access to every endpoint on this page.
  • A key with scopes can call only the endpoints its scopes cover. Each endpoint below lists the scope it requires. Endpoints marked Full-access keys only are not covered by any scope, so only a key with no scopes can call them.
  • A request that the key's scopes do not cover returns 403. The response names the missing scope in required_scopes.
  • When a browser session (rather than an API key) calls the gateway, GET requests are open to every signed-in user and POST/PUT/PATCH/DELETE require the Editor or Admin role.
  • Object Maintenance endpoints are available only when the object_maintenance feature is enabled on your deployment.

Some endpoints choose the required scope from the request body. POST /tables/{table_id}/crunch with "job_type": "vacuum" requires vacuum:write; any other job type requires crunch:write. Policy writes pick between crunch_policy:write, vacuum_policy:write, and partition_exp_policy:write from the body's type field. The legacy policies:write scope satisfies all three.

Identifiers

Two different IDs refer to a table. Pass the right one to each endpoint:

IDWhere it comes fromUsed by
table_idThe id returned by POST /tables (the onboarding registration).Table, schedule, onboarding, crunch, vacuum, partition-expiration, and hard-delete endpoints.
manage_table_idThe table's row in Granica's table inventory, created by catalog sync. Returned as manage_table_id by POST /tables and by the catalog table listings.Policy endpoints, and the manage_table_id field in crunch, vacuum, partition-expiration, and hard-delete request bodies.

A table registered with POST /tables before its catalog has been synced has no manage_table_id yet. POST /tables returns next_action in that case, telling you what to run so the table gets linked.

Errors

Every 4xx and 5xx response uses the RFC 7807 problem-details format, with Content-Type: application/problem+json:

{
  "type": "about:blank",
  "title": "Conflict",
  "status": 409,
  "detail": "Table 'orders' already exists"
}
  • detail carries the human-readable reason. Most error messages say what to do next.
  • Request-validation failures return 422. Each failing field is listed in the validation_errors extension.
  • Some endpoints add extension fields, such as code, can_force, or allowed_transitions. These are documented with the endpoint.

Pagination

List endpoints take offset (default 0) and limit query parameters, and return { "items": [...], "total": <count> } unless noted otherwise. The default and maximum limit vary by endpoint and are given in each parameter table.

Table formats

Wherever a table format appears it is one of delta, iceberg, hudi, hive, parquet, raw, or hive_external_parquet. unsupported is reported for catalog tables that cannot be classified, and such tables cannot be onboarded.

Priorities

priority is P1 (highest) through P5 (lowest). The default is P3.


Health

Health Check

GET /api/v1/health

Scope: config:read

Liveness check. Returns 200 with status and version while the API is running.

If the startup scan found catalog connections whose stored client secret can no longer be decrypted (for example, because the API's encryption key was rotated), the response also includes undecryptable_secrets: the number of affected connections. Re-enter the secret on those connections to fix them. The field only appears when it is non-zero, so probes that check only the status code are unaffected.

{ "status": "healthy", "version": "3.13.0" }

Configuration

Platform-wide settings that control slot-based scheduling capacity.

Get Config

GET /api/v1/config

Scope: config:read

Returns the customer configuration.

FieldDescription
default_runtime_minsDefault expected runtime assigned to new tables, in minutes.
slot_duration_minsLength of one scheduling slot, in minutes. For example, 30 means the slot 14:00 covers 14:00–14:30.
max_scheduled_per_slotMaximum number of scheduled jobs that may share one slot. POST /tables/{table_id}/schedule returns 429 when a slot is full.
max_ondemand_concurrentMaximum number of on-demand jobs that run concurrently.

Update Config

PUT /api/v1/config

Scope: config:write

Updates the customer configuration. Send only the fields you want to change.

Request body: CustomerConfigUpdate

FieldTypeRangeDescription
default_runtime_minsinteger5–120Default runtime for new tables.
slot_duration_minsinteger15–60Slot duration.
max_scheduled_per_slotinteger1–50Maximum scheduled jobs per slot.
max_ondemand_concurrentinteger1–20Maximum concurrent on-demand jobs.
ResponseDescription
200Returns the updated configuration.
422A value is out of range.

Get Slot Info

GET /api/v1/slots/{run_time_utc}

Scope: config:read

Returns how full a scheduling slot is. Use it to pick a run_time_utc with free capacity before you create a schedule.

run_time_utc is HH:MM in UTC. Leading zeros are optional: 2:30 and 02:30 refer to the same slot.

{ "slot": "02:30", "scheduled_count": 7, "max_scheduled": 10, "available": 3 }

Tables

A table is a registration that brings a dataset under Granica management. Registering a table starts onboarding: Granica validates the table's location and schema, auto-discovers its partition layout, cluster columns, and enumerated columns, and generates a compression recipe. When onboarding reaches active, the table can be crunched on demand or on a schedule.

Onboarding status moves through pending → validating → validated → optimizing → active, or to failed. retry means a retry has been queued. Maintenance operations (vacuum, partition expiration, hard-delete) only need discovery to finish, so they are allowed from validated onward. Crunch and schedules need active.

List Tables

GET /api/v1/tables

Scope: tables:read

Lists registered tables, each with its embedded schedule. Use name to look up a table's ID by its unique name, for example after POST /tables returns 409.

ParameterInRequiredDescription
offsetqueryNoPagination offset. Default: 0.
limitqueryNoResults per page, 1–1000. Default: 100.
statusqueryNoFilter by onboarding status, for example pending, active, or failed.
namequeryNoFilter by exact table name.

Each item is a TableResponse. Besides the fields you set, it includes what onboarding discovered:

FieldDescription
onboarding_status, onboarding_errorOnboarding state and the last error, if any.
date_partition_pattern, partition_columnsDiscovered date-partition layout. Partition expiration derives its delete filter from date_partition_pattern.
cluster_columns, enumerated_columnsDiscovered or user-set layout columns.
auto_discovery_status, auto_discovery_resultDiscovery outcome: pending, running, discovered, needs_review, failed, skipped, or not_applicable.
is_append_only, mutation_count_per_day, append_count_per_dayWrite-pattern statistics sampled from the table's commit history.
size_bytes, file_count, size_snapshot_atLatest size snapshot.
file_formatUnderlying file format of a Hive table, such as parquet or json.
forge_override, compression_route_override, data_timezoneEngine, routing, and timezone settings (see Update Table).
target_file_size_mb, max_concurrent_jobsOutput file size target and concurrency limit.
scheduleThe table's schedule, if it has one.

Create Table

POST /api/v1/tables

Scope: tables:write

Registers a table and starts onboarding. You don't need to provide a partition pattern, date filter, cluster columns, or enumerated columns: onboarding discovers them. Add a schedule or policy after onboarding completes.

Request body: TableCreate

You can identify the table in one of these ways. They are checked in this order:

  1. manage_table_id: a table already synced from a catalog. Location and format are read from Granica's table inventory. This is the recommended path for catalog tables.
  2. manage_object_prefix_id: an Object Maintenance prefix. Location comes from the prefix and format from discovery. If a table is already registered at that location, it is reused and linked to the prefix rather than duplicated. name is optional here: a name is derived from the prefix path, with a -2, -3 suffix added on collision.
  3. uri + format: a storage path and format, given directly.
  4. catalog_table_path: Deprecated. Unity Catalog full name. Use manage_table_id instead.
  5. connection_id + catalog_database + catalog_table_name: required for Iceberg tables addressed through a Hive Metastore or Iceberg REST connection.

At most one of manage_table_id, manage_object_prefix_id, and catalog_table_path may be set.

FieldTypeDescription
namestringUnique table name, 1–255 characters. Required except with manage_object_prefix_id.
manage_table_idUUIDInventory row of a synced catalog table.
manage_object_prefix_idUUIDObject Maintenance prefix to onboard. Also sets the prefix's management state to active.
uristringStorage path (s3://, gs://, az://).
formatstringTable format. See Table formats.
catalog_table_pathstringDeprecated. Unity Catalog full name.
connection_idUUIDCatalog connection. Required for Iceberg. Must be a hive_metastore or iceberg_rest connection: Iceberg tables in AWS Glue are discovered but not yet supported for maintenance.
catalog_databasestringDatabase or namespace. Required for Iceberg.
catalog_table_namestringTable name in the catalog. Required for Iceberg.
prioritystringScheduling priority. Default: P3.
data_timezonestringIANA timezone (for example America/New_York) that the table's partition values are written in. It decides which calendar day a run treats as "today" and where the partition-expiration cutoff falls. Schedule run times stay in UTC.
forge_overridestringRun this table on the Forge engine with the named runtime: forge_jar_k8s, forge_jar_emr, forge_jar_serverless, or forge_jar_dataproc. ironman or null keeps the table off Forge. An explicit value always wins. When omitted, new tables default to forge_jar_k8s if the platform's Forge feature flag is on and the format supports Forge.
inventory_report_uristringHive tables only. URI (s3://, s3a://, gs://) of a file inventory you provide. The storage scan reads this file instead of listing the table's directory.
{
  "name": "orders",
  "uri": "s3://bucket/data/orders",
  "format": "delta",
  "priority": "P2"
}
{
  "name": "events",
  "connection_id": "2f7c…",
  "catalog_database": "analytics",
  "catalog_table_name": "events"
}

Response: 201 with the table, plus two linking fields:

FieldDescription
manage_table_idThe inventory row this registration is linked to. Pass this ID to the policy endpoints.
next_actionSet only while the registration is not yet linked to a synced catalog table. It says what to run (usually a catalog sync) so the table is linked, appears in the console, and accepts policies.
ResponseDescription
201Table registered and onboarding started.
404manage_table_id, manage_object_prefix_id, or connection_id not found, or catalog_table_path is not in the synced catalog metadata (run a sync first).
409A table with this name (or, for catalog tables, the same connection/database/table) already exists, or the inventory table is already onboarded. Use GET /tables?name=... to find the existing table's ID.
422Validation failed: missing name, uri, or format; an unsupported format; a non-Hive table with inventory_report_uri; Forge not eligible for this table; Iceberg without the catalog fields; or the inventory table is no longer available.

Get Table

GET /api/v1/tables/{table_id}

Scope: tables:read

Returns one table and its schedule. Returns 404 if the table does not exist.

Update Table

PUT /api/v1/tables/{table_id}

Scope: tables:write

Updates table configuration. Send only the fields you want to change.

Request body: TableUpdate

FieldTypeDescription
prioritystringP1–P5.
target_file_size_mbintegerTarget output file size, 64–1024 MB.
max_concurrent_jobsintegerMaximum concurrent jobs for this table (at least 1).
cluster_columnsstringComma-separated column names. Each must match [A-Za-z_][A-Za-z0-9_]*. Overrides the discovered value; discovery evidence is kept.
enumerated_columnsobjectMap of column name to a list of values.
scheduleobjectA nested ScheduleUpdate (see Update Schedule) applied to the table's schedule.
compression_route_overridestringForce crunch or optimize routing. null restores automatic routing.
data_timezonestringIANA timezone of the partition values.
forge_overridestringForge runtime, or ironman/null to turn Forge off. The platform's Forge version must be configured first, otherwise 422.
inventory_report_uristringHive only. Changing it to a new non-null value on an onboarded table queues an inventory refresh against the new file. The refresh picks up newly added partitions; it is not a full reconcile. Setting null clears the field and does not queue anything.
{
  "priority": "P1",
  "target_file_size_mb": 512
}
ResponseDescription
200Returns the updated table.
404Table not found.
409An inventory refresh for this table is mid-retry. Try again once its current attempt starts or completes.
422Validation failed, Forge not eligible for this table, or the Forge version is not configured.

Delete Table

DELETE /api/v1/tables/{table_id}

Scope: tables:write

Deletes a table registration and its schedules. Any in-flight work for the table is stopped first. Data in storage is not touched.

ResponseDescription
204Deleted.
404Table not found.
503In-flight work could not be stopped, so the table was not deleted. Retry.

Refresh Inventory

POST /api/v1/tables/{table_id}/inventory-refresh

Scope: tables:write

Queues an on-demand object-inventory refresh for a Hive table. The refresh finds new partitions and new files in partitions it has already seen. It only discovers files; it does not crunch them.

Request body (optional): InventoryRefreshRequest

FieldTypeDescription
inventory_report_uristringA fresh file inventory to run this refresh against, which skips directory listing. When omitted, the table directory is listed. The table's stored inventory_report_uri is never reused, because a stale inventory must not drive a refresh.

Response: 202 with table_id, refresh_id, status, and message.

ResponseDescription
202Refresh queued.
404Table not found.
409A refresh is mid-retry. Try again once its current attempt starts or completes.
422The table is not Hive, the URI is invalid, or the table has no scannable location (a Hive Metastore database and table, or a Glue table location).

Get Engine Readiness

GET /api/v1/tables/{table_id}/engine-readiness

Scope: tables:read

A dry run of engine selection. It reports which engines the table can run on and which one a crunch would use right now. Nothing is changed or queued.

FieldDescription
table_formatThe table's format.
forge_overrideThe value stored on the table, or null.
forge_flag_enabledWhether the platform's Forge feature flag (the default for new tables) is on.
feasible_enginesEvery engine the table is eligible for.
recommendedThe engine a crunch triggered now would use.
reasonWhy that engine was chosen.

Onboarding

Get Onboarding Status

GET /api/v1/onboarding/{table_id}/status

Scope: onboarding:read

Returns the table's onboarding progress.

FieldDescription
onboarding_statusCurrent status. See Tables.
onboarding_errorLast error, if any.
can_retrytrue when a plain retry is allowed (the table failed or stalled).
can_forcetrue when a forced retry is allowed (onboarding is in progress or already active).
retry_countNumber of retries so far.

Retry Onboarding

POST /api/v1/onboarding/{table_id}/retry

Scope: onboarding:write

Restarts onboarding for a table.

  • failed, or validated with a failed recipe generation: onboarding is reset and rescheduled. force is not needed.
  • In progress or active, without force: returns 409. The response carries code, onboarding_status, and can_force: true, so a client can confirm with the user and retry with force.
  • In progress or active, with force: true: any live onboarding pipeline is cancelled, then onboarding is reset and rescheduled.

Concurrent retries on the same table are serialized.

Request body (optional):

{ "force": true }

Response: 202 with previous_status, new_status, and message.

ResponseDescription
202Retry queued.
404Table not found.
409Onboarding is in progress or active. Retry with force: true to cancel it and start over.

Cancel Onboarding

POST /api/v1/onboarding/{table_id}/cancel

Scope: onboarding:write

Cancels an in-flight onboarding run, in either the metadata-collection phase or the recipe-generation phase. The running pipeline is torn down and its task pods are released. The table's status is set to failed, so it can be retried later.

Response: 200 with phase (the phase that was cancelled) and message.

ResponseDescription
200Cancelled.
404Table not found.
409Nothing is in flight to cancel.

Table Policies

A policy is the recommended way to set up recurring maintenance for a catalog table. One policy document holds a table's crunch, vacuum, and partition-expiration settings. Each save creates a new, numbered version.

The scheduler reconciles each table's schedules against its active policy about once a minute. Schedules are created, updated, or deleted to match, so you don't need to call the schedule API after saving a policy. Any schedule you change directly on a table that has a policy will be overwritten.

Policy endpoints take the table's manage_table_id, not its table_id. See Identifiers.

Policy document

{
  "policy_document": {
    "policies": [
      {
        "id": "crunch",
        "enabled": true,
        "schedule": {
          "scheduleType": "daily",
          "runTimeUtc": "02:00",
          "jobType": "optimize",
          "partitionRangeStart": { "unit": "days", "value": 2 },
          "partitionRangeEnd": { "unit": "days", "value": 0 }
        },
        "primitives": [{ "id": "compaction", "enabled": true }],
        "options": { "targetFileSizeBytes": 134217728 }
      },
      {
        "id": "partition_expiration",
        "enabled": true,
        "options": { "retentionDays": 90 }
      }
    ]
  },
  "change_summary": "Nightly optimize over T-2..T-0, keep 90 days",
  "type": "crunch"
}

Policy entries (policies[].id):

idPurpose
crunchRecurring crunch or optimize.
snapshot_expiration_vacuum, snapshot_expiration_vacuum_lite, snapshot_expiration_vacuum_fullVacuum lanes.
partition_expirationDrop partitions older than a retention window.

Entries with other IDs are stored as given, so newer documents still save.

schedule fields:

FieldDescription
scheduleTypedaily, weekly, monthly, hourly, or custom. backfill is not allowed in a policy: use Trigger Crunch for a one-off date range.
runTimeUtcHH:MM. Its meaning depends on the cadence (see Sub-daily cadences). Default: 02:00. An explicit null is rejected.
jobTypecrunch or optimize.
partitionRangeStart, partitionRangeEndThe lookback window, as { "unit": "days" or "hours" or "weeks", "value": <non-negative integer> }. Unknown units are rejected, because the scheduler would otherwise read them as days.

options keys read by the scheduler:

PolicyOptions
crunchtargetFileSizeBytes, sortColumns, sortColumnsPartitionLevel, zOrderColumns, bloomColumns, fpp, swizzleColumns, mode, deleteSourceFiles, compactionOutputPath, minAgeFilterSeconds
Vacuum lanesretentionHours, retainLast, vacuumAlgorithm, inventoryPath, manifestPath, deferred, ttlDays, allowUnsafeRetention
partition_expirationretentionDays (required when the entry is enabled, an integer of at least 1), deferred, ttlDays, manifestPath

Validation is limited to the fields the scheduler would otherwise misread without any error: policies must be a list, every entry needs a string id, options must be an object, and the scheduleType, runTimeUtc, range-unit, and retentionDays rules above apply. Everything else is stored as given.

Other request fields:

FieldDescription
change_summaryNote shown in the version history.
typecrunch (default), vacuum, or partition_expiration. The API itself ignores it, but the gateway uses it to pick the required scope. Send it when your key holds a specific policy scope rather than policies:write.
actor_email, actor_role, actor_user_idAudit fields, recorded as given. Defaults: system and api. They are never used for authorization.

Create or Replace Policy

POST /api/v1/tables/{manage_table_id}/policies

Scope: crunch_policy:write, vacuum_policy:write, or partition_exp_policy:write, chosen by type. policies:write also works.

Saves a new active policy version. In one transaction, it appends the version, deactivates the previous one, points the policy at the new version, and copies the enabled flags onto the table. The scheduler applies the change on its next run.

To restore an earlier version, POST that version's policy_document again with an explanatory change_summary. There is no separate restore endpoint.

Response: 201 with TablePolicyResponse: id, active_version_id, version, policy_document, enabled_primitives, crunch_enabled, vacuum_enabled, partition_exp_enabled, auto_apply_optimus, and timestamps.

ResponseDescription
201Policy version saved.
404Managed table not found.
409The table's Iceberg partition metadata or date scope is unsafe, untrusted, or stale. The message names the cause and the next step: the table is still onboarding; discovery is missing or stale (force an onboarding retry); discovery found no partition facts; the metadata is malformed; or the table is waiting for data or unpartitioned.
422The policy document failed validation.

Validate Policy

POST /api/v1/tables/{manage_table_id}/policies/validate

Scope: Same as Create or Replace Policy.

Runs the same admission checks as a save for an enabled crunch policy, without writing a policy or an audit row. Call it to find problems before saving.

ParameterInRequiredDescription
include_guardqueryNoWhen true, return 200 with a validated snapshot instead of 204. Default: false.
ResponseDescription
204The policy would be accepted.
200The policy would be accepted (include_guard=true). The body holds the validated snapshot.
409Unsafe, untrusted, or stale Iceberg partition metadata or date scope.
422The policy document failed validation.

Get Active Policy

GET /api/v1/tables/{manage_table_id}/policies

Scope: crunch_policy:read, vacuum_policy:read, partition_exp_policy:read, or policies:read

Returns the active policy and its summary flags. Returns 404 if no policy is attached to the table.

List Policy Versions

GET /api/v1/tables/{manage_table_id}/policies/versions

Scope: Same as Get Active Policy.

Returns the policy's version history, newest first, as { "versions": [...], "total": n }. Each version has version, policy_document, enabled_primitives, change_summary, created_by, activated_at, deactivated_at, and is_active.

A table with no policy yet returns an empty list rather than 404. A manage_table_id that does not exist returns 404.

Validate Action

POST /api/v1/tables/{manage_table_id}/actions/validate

Scope: Full-access keys only.

Runs the admission checks for an on-demand crunch without creating anything, and returns the queued action as the server would record it. The body is the same as Trigger Crunch.

ResponseDescription
200The action would be accepted.
409Unsafe, untrusted, or stale Iceberg partition metadata or date scope.

Set Policy Preferences

PUT /api/v1/tables/{manage_table_id}/policy-preferences

Scope: crunch_policy:write, vacuum_policy:write, partition_exp_policy:write, or policies:write

Turns automatic application of Optimus recommendations on or off for a table. This preference is stored on the table's policy record, not in the policy document, so changing it does not create a new policy version.

{ "auto_apply_optimus": true }

When true, Optimus recommendations for this table with action APPLY are applied automatically after each Optimus run, without review. Returns 404 if the table has no policy record.


Schedules

A schedule tells the scheduler when to run a job on a table. A table can have one schedule per job_type: crunch, optimize, vacuum, vacuum_lite, vacuum_full, or partition_expiration.

For catalog tables with a policy, the scheduler overwrites schedules to match the policy about once a minute. Use Table Policies for those tables. The schedule API is for tables without a policy.

Sub-daily cadences

run_time_utc is always HH:MM, but its meaning depends on schedule_type:

schedule_typerun_time_utc meansFires
daily, weekly, monthlyUTC time of day, 00:00–23:59.Once per eligible day at that time.
hourly00:MM. Only the minute is read (0–59).Every hour at minute MM.
customAn interval: HH:MM means every HH*60 + MM minutes. Must be 15–1439 minutes.Every N minutes, counting from 00:00 UTC.
backfillIgnored.Once, over backfill_start_date–backfill_end_date.

The lookback values are day offsets: lookback_start: 15, lookback_end: 2 processes partitions from 15 days ago through 2 days ago. 0 is today's UTC date when the job fires. lookback_start must be greater than or equal to lookback_end. Use 0 when data lands continuously (hourly) or when partitions are dated in a timezone ahead of UTC.

Create Schedule

POST /api/v1/tables/{table_id}/schedule

Scope: schedules:write

Creates a schedule. The table must be active.

Request body: ScheduleCreate

FieldTypeDescription
schedule_typestringRequired. daily, weekly, monthly, hourly, custom, or backfill.
lookback_startintegerRequired for every type except backfill. Start at T-N days.
lookback_endintegerRequired for every type except backfill. End at T-N days.
run_time_utcstringSee Sub-daily cadences. Default: 02:00.
backfill_colstringColumn used for backfill filtering.
backfill_start_date, backfill_end_datedateRequired for backfill. Start must be on or before end.
job_typestringDefault: crunch. optimize and the vacuum types need a Delta or Iceberg table. partition_expiration needs Delta, Iceberg, or Hive.
job_contextobjectJob options passed through to the engine, such as vacuum or partition-expiration options. See JobContext.

Daily, T-15 to T-2:

{
  "schedule_type": "daily",
  "lookback_start": 15,
  "lookback_end": 2,
  "run_time_utc": "02:00"
}

Every 30 minutes, today's partition:

{
  "schedule_type": "custom",
  "lookback_start": 0,
  "lookback_end": 0,
  "run_time_utc": "00:30"
}

Backfill:

{
  "schedule_type": "backfill",
  "backfill_col": "event_date",
  "backfill_start_date": "2025-01-01",
  "backfill_end_date": "2025-12-31"
}

Response: 201 with the schedule, including enabled, next_run_at, and last_run_at.

ResponseDescription
201Schedule created.
400The table is not active; job_type is not supported for this table's format; a partition-expiration retention filter can't be derived from the table's date_partition_pattern; or the cadence is invalid.
404Table not found.
409A schedule with this job_type already exists for the table. Use PUT to change it.
429The slot is full. The response includes slot, scheduled, max, and a suggestion to try a different time.

Get Schedule

GET /api/v1/tables/{table_id}/schedule

Scope: schedules:read

Returns the table's schedule.

ParameterInRequiredDescription
job_typequeryNoWhich schedule to return, for example crunch, vacuum, or partition_expiration.

Returns 404 if no matching schedule exists.

Update Schedule

PUT /api/v1/tables/{table_id}/schedule

Scope: schedules:write

Partially updates a schedule. Send only the fields you want to change. The result is validated as a whole: the cadence and lookback rules, the job-type-versus-format check, and the partition-expiration filter check all run on the merged schedule. If today's run time changes before the job has fired, today's run is rescheduled to the new time.

ParameterInRequiredDescription
job_typequeryNoWhich schedule to update.

Request body: ScheduleUpdate. Takes the same fields as Create Schedule, all optional, plus enabled (boolean) to pause or resume the schedule.

{
  "lookback_start": 7,
  "lookback_end": 1,
  "run_time_utc": "03:00",
  "enabled": false
}
ResponseDescription
200Returns the updated schedule.
400The merged schedule is invalid (bad cadence or lookback, format not supported, or partition-expiration filter not derivable).
404Table or schedule not found.
409Conflict while applying the update.

Delete Schedule

DELETE /api/v1/tables/{table_id}/schedule

Scope: schedules:write

Deletes a schedule. The call is idempotent: it returns 204 even if no matching schedule exists.

ParameterInRequiredDescription
job_typequeryNoWhich schedule to delete.

Crunch

Crunch rewrites a table's data files for better compression and layout. optimize is a related job type for Delta and Iceberg that compacts and sorts files in place. Each crunch request creates one job per partition date in the requested window, or a single job for a whole-table run.

Trigger Crunch

POST /api/v1/tables/{table_id}/crunch

Scope: crunch:write, or vacuum:write when job_type is vacuum

Triggers a crunch immediately, outside any schedule.

How the request is handled depends on the table's onboarding status:

  • active: jobs are submitted immediately.
  • Not yet active, with manage_table_id: the action is queued and starts when onboarding completes.
  • Not yet active, without manage_table_id: returns 400. Wait for onboarding to finish, or pass manage_table_id.

Request body: CrunchTrigger

scope sets the shape of the run:

  • incremental (default): crunch a date window, set in one of two ways (not both):
    • Lookback: lookback_start and lookback_end, relative to today.
    • Backfill: backfill_start_date and backfill_end_date, absolute and inclusive.
  • full: one whole-table job, with no dates and no batch_mode. Not supported for Hive tables. For Iceberg, the table needs current, trusted partition metadata and a qualified format-v3 runtime, otherwise 409. Policies cannot request a full-scope run.
FieldTypeDescription
scopestringincremental (default) or full.
lookback_start, lookback_endintegerT-N day offsets. 0 is today's UTC date. Start must be greater than or equal to end.
backfill_start_date, backfill_end_datedateInclusive date range.
manage_table_idUUIDRequired for catalog tables. Records the action against the table and lets the request queue until onboarding finishes. Omit it only for tables registered by uri with no catalog.
prioritystringP1–P5. Default: P3.
job_typestringcrunch (default) or optimize. optimize needs a Delta or Iceberg table.
cluster_columnsstringComma-separated cluster columns for this run.
job_timeout_secondsintegerPer-job time limit, 1800–43200 seconds (30 minutes to 12 hours). Defaults to the platform setting.
max_dag_retriesintegerHow many times to re-run a failed job, 0–5. Default: no automatic retry.
use_experimentalbooleanUse the experimental native crunch engine. Hive Parquet only.
skip_recipe_sortbooleanRun with the table's base recipe: no learned sort order. Explicit sort columns still apply. Only for crunch and optimize, not with batch_mode, and not supported on Forge.
chunk_idstringHive only. Crunch a single object-inventory chunk. Default: all sealed chunks.
job_contextobjectAdvanced engine options. See JobContext.
batch_modebooleanIceberg only. Group the per-partition jobs into one Spark rewrite. Default: false.
batch_max_bytesintegerBatch size limit in bytes. Defaults to the platform setting.
ParameterInRequiredDescription
skip_recipe_checkqueryNoSkip the check that recipe generation has completed. For testing. Default: false.
include_crunch_idsqueryNoReturn the IDs of the jobs created, in crunch_ids (up to 1000). Does not change how jobs are dispatched. Default: false.

Lookback mode (T-15 to T-2, 14 days):

{
  "lookback_start": 15,
  "lookback_end": 2,
  "priority": "P2"
}

Backfill mode:

{
  "backfill_start_date": "2026-01-01",
  "backfill_end_date": "2026-01-15",
  "priority": "P2",
  "cluster_columns": "user_id,event_type"
}

Whole table:

{
  "scope": "full",
  "manage_table_id": "8b1d…",
  "job_type": "optimize"
}

Response: 201 with CrunchTriggerResponse:

FieldDescription
entries_createdNumber of jobs created. 0 when the action was queued until onboarding finishes.
date_range_start, date_range_endThe resolved date window.
modeThe mode used: lookback, backfill, or full.
action_idThe recorded action, when a manage_table_id was given.
crunch_ids, crunch_ids_completeOnly with include_crunch_ids=true. Job IDs created or re-armed (an ID may repeat). crunch_ids_complete is true only when every ID is listed. It is false for queued actions or when the 1000-ID limit was reached.
ResponseDescription
201Jobs created, or the action queued.
400The request is invalid for this table. For example: no manage_table_id on a table that isn't active; optimize or vacuum on an unsupported format; scope: full on Hive; use_experimental or parallel_crunch_max_workers on a table that isn't Hive Parquet; in-place compaction of a non-Parquet Hive table; recipe generation not finished; or no date window.
404Table not found, or chunk_id is not a dirty chunk in the table's inventory.
409The run conflicts with current state. For example: another job already covers the window or the whole table; a job in the window is still being cancelled; in-place compaction while another crunch runs; no object inventory for a Hive table (run the inventory first); or partition metadata that can't safely define a date scope (rediscover the table).
422Validation failed, for example compression-only settings with job_type: crunch (use optimize).

JobContext

job_context holds advanced, job-specific engine options. Every field is optional and unknown keys are passed through.

FieldDescription
target_file_size_bytesTarget output file size. With Hive Parquet, 1 means compression-only: files are rewritten one for one. Compression-only requires job_type: optimize.
sort_columnsComma-separated sort columns within each file.
sort_columns_partition_levelComma-separated columns for a global sort across each partition.
zorder_columnsComma-separated Z-order columns, as recommended by Optimus.
sort_strategyForge sort strategy, such as SORT or ZORDER.
bloom_columns, bloom_fppColumns to build Parquet bloom filters on, and the false-positive rate (strictly between 0 and 1; default 0.01).
swizzle_columnsColumns to move to the front of the Parquet schema.
auto_learnLearn and cache a recipe when optimize finds none. Default: true. Set false to use only existing recipes.
rewrite_allRewrite every eligible file in scope. This does not widen the scope to the whole table.
forge_optimize_modeForge file selection: incremental keeps stable files, full reclusters everything in scope.
min_input_filesForge: minimum number of candidate files before a job runs.
min_age_filterForge raw/Hive Parquet: skip objects modified within this many seconds of job start. Requires the Forge Kubernetes engine.
forge_parquet_auto_recipeForge Parquet compression-only: choose between the base and sorted recipe for each file by measurement.
compaction_modeHive: out_of_place (default; merged files go to a new path and the source files stay) or in_place (merged files are committed and the source files deleted). in_place must be paired with delete_source_files: true, and can't start while another crunch is running on the table.
delete_source_filesOpts in to in-place compaction. Sets compaction_mode to in_place.
compaction_output_pathOut-of-place destination for merged files. Must be outside the table's prefix.
parallel_crunch_max_workersExperimental, Hive Parquet only. Caps the worker pool. When omitted, it is sized from file sizes to avoid running out of memory.
granica_parquet_writer_enabledUse the Granica Parquet writer during optimize.
compute_puffin_stats, puffin_columnsIceberg: after optimize, compute Puffin statistics (distinct-value sketches) for the given columns, or all columns.
retention_hours, dry_run, expire_snapshots, remove_orphan_files, rewrite_manifestsVacuum options. See Trigger Vacuum.

List Table Crunch Jobs

GET /api/v1/tables/{table_id}/crunch

Scope: crunch:read or vacuum:read

Lists a table's crunch and optimize jobs.

ParameterInRequiredDescription
offsetqueryNoDefault: 0.
limitqueryNo1–1000. Default: 100.
statusqueryNoFilter by job status, for example pending, processing, completed, failed, cancelling, or cancelled.
job_typequeryNocrunch or optimize.

Each job includes the partition (crunch_data_date, partition_condition), crunch_job_status, priority, and Spark details (spark_app_state, spark_error_message, submit and end times, duration, attempt counts). It also includes job_context, job_timeout_seconds, max_dag_retries, error_message, retry_count, and the Granica release version that ran the job.

Returns 404 if the table does not exist.

List All Crunch Jobs

GET /api/v1/crunch

Scope: crunch:read or vacuum:read

Lists crunch and optimize jobs across all tables.

ParameterInRequiredDescription
offsetqueryNoDefault: 0.
limitqueryNo1–1000. Default: 100.
table_idqueryNoFilter by table.
statusqueryNoFilter by job status.
job_typequeryNocrunch or optimize.

Get Crunch Job With Metrics

GET /api/v1/crunch/{crunch_id}/metrics

Scope: crunch:read or vacuum:read

Returns a job together with metrics summed across all its partitions.

FieldDescription
file_countFiles rewritten.
before_bytes, after_bytesBytes before and after. For crunch, these are the bytes removed and written. For optimize, files that were already compressed are excluded (in older records). For Forge, they are the input and output bytes.
before_rows, after_rowsRow counts before and after.
drr_percentData Reduction Rate, (1 − after/before) × 100, computed when requested.
granica_bytes_removedBytes saved, as reported by Forge.

Returns 404 if the job does not exist.

Cancel Crunch Job

POST /api/v1/crunch/{crunch_id}/cancel

Scope: crunch:write

Cancels (kills) a crunch job that is pending or processing.

  • Supported formats: Hive, Iceberg, Delta, and raw tables.
  • Supported runtimes: jobs running on Spark-on-Kubernetes in the Granica cluster. Jobs on Forge EMR, Serverless, or Dataproc, jobs sent to EMR or Dataproc, and hybrid deployments return 409, because there's no way to confirm their writer has stopped.

The job moves to cancelling straight away. Teardown runs in the background and the job then becomes cancelled. If teardown fails, it's retried automatically. A batched job is cancelled together with every other job in its batch.

Response: 200 with crunch_id, table_id, action: "cancel", target_status: "cancelling", and message.

ResponseDescription
200Cancellation started.
404Job not found.
409The format or runtime isn't supported, the job isn't pending or processing, or it reached a terminal state while the request was processed.

Retry Crunch Job

POST /api/v1/crunch/{crunch_id}/retry

Scope: crunch:write

Retries a failed crunch job. The job is reset to pending, its previous error is cleared, and it's dispatched again with a fresh run ID. Re-running is safe: the rewrite overwrites earlier output and metrics are recomputed.

Response: 200 with previous_status, new_status: "pending", and message.

ResponseDescription
200Job re-queued.
404Job not found.
409The job isn't failed, its status just changed, or another job has since taken its partitions or chunk.

Vacuum

Vacuum removes data files that a Delta or Iceberg table no longer references. Vacuum runs are tracked separately from crunch jobs.

Trigger Vacuum

POST /api/v1/tables/{table_id}/vacuum

Scope: vacuum:write

Starts a vacuum on a Delta or Iceberg table. The table must be at least validated.

Vacuum must be enabled on your deployment (the vacuum_policies feature flag); otherwise this endpoint returns 403.

Request body: VacuumTrigger

FieldTypeDescription
manage_table_idUUIDRequired. The table's inventory row, used to record the action.
prioritystringP1–P5. Default: P3.
retention_hoursintegerKeep files newer than this. 0 or omitted uses the table's own delta.deletedFileRetentionDuration. Values below that property are rejected unless allow_unsafe_retention is set.
retain_lastintegerIceberg: minimum number of snapshots to keep. Defaults to the table's history.expire.min-snapshots-to-keep.
dry_runbooleanList the files that would be deleted, without deleting them.
deferredbooleanSoft-delete: record the files to delete and remove them after ttl_days. Until then, they can be recovered from Delayed Deletions. Requires the vacuum_deferred feature flag. Can't be combined with dry_run.
ttl_daysintegerDays before files are hard-deleted, 0–90. Required with deferred. 0 means the next hourly sweep.
vacuum_modestringimmediate (default) or deferred.
vacuum_algorithmstringfull (scan for orphaned files; default), lite (only files the transaction log marks removed), or inventory (uses an S3 Inventory report; requires inventory_path).
manifest_pathstringWhere to store deletion manifests.
inventory_pathstringS3 Inventory report path, for the inventory algorithm.
allow_unsafe_retentionbooleanUnsafe. Accept a retention below the table's configured minimum. Restricted to admins and gated by a feature flag.
expire_snapshots, remove_orphan_files, rewrite_manifestsbooleanIceberg: which maintenance steps to run. Each defaults to true.
{
  "manage_table_id": "8b1d…",
  "deferred": true,
  "ttl_days": 7
}

Response: 201 with action_id, entries_created, vacuum_mode, vacuum_algorithm, and message.

ResponseDescription
201Vacuum queued.
400The table is not Delta or Iceberg.
403Vacuum is disabled on this deployment.
404Table not found.
409The table isn't ready for maintenance yet (discovery hasn't finished). Retry once it reaches validated.
422deferred requested but deferred vacuum is disabled; or validation failed (deferred with dry_run, missing ttl_days, or inventory without inventory_path).

List Table Vacuum Jobs

GET /api/v1/tables/{table_id}/vacuum

Scope: vacuum:read

Lists a table's vacuum runs.

ParameterInRequiredDescription
offsetqueryNoDefault: 0.
limitqueryNo1–1000. Default: 100.
statusqueryNoFilter by status: pending, scheduled, running, completed, failed, or cancelled.

Trigger Hard Delete

POST /api/v1/tables/{table_id}/hard-delete

Scope: Full-access keys only.

Queues an immediate hard-delete of a table's soft-deleted files whose recovery window has already passed. An hourly sweep deletes these files anyway; use this endpoint when you don't want to wait for it. Recovery windows are never shortened: files still inside their window are not affected.

The deletion itself runs in a background job that has access to your storage. This endpoint only queues that job.

Requires the vacuum_deferred feature flag.

Request body:

{ "manage_table_id": "8b1d…" }

manage_table_id must refer to the same table as table_id. This ensures the deletion is always recorded against the table whose files are deleted.

Response: 201 with HardDeleteTriggerResponse. The counts describe what was eligible when the job was queued, not what was deleted:

FieldDescription
entries_created1 if a job was queued, 0 if nothing was eligible.
due_records, due_filesDelayed deletions and files whose window has passed.
action_id, maintenance_job_idThe recorded action and job, or null when nothing was queued.
ResponseDescription
201Job queued, or nothing was due.
400manage_table_id does not belong to this table.
403Deferred vacuum is disabled on this deployment.
404Table not found.
409The table isn't ready for maintenance yet.

Partition Expiration

Partition expiration drops partitions older than a retention window. You give the retention in days, and Granica builds the delete filter from the table's discovered date_partition_pattern.

  • Delta and Iceberg: metadata only. Matching files are marked deleted in the table log but stay in storage. You can recover them with time travel until vacuum removes them.
  • Hive: the partitions are dropped from the metastore. For external tables, the files are deleted too, or recorded for a delayed delete when deferred is set. Hive has no time travel, so deferred is its only recovery window.

Trigger Partition Expiration

POST /api/v1/tables/{table_id}/partition-expiration

Scope: partition_exp_policy:write

Starts a partition-expiration run on a Delta, Iceberg, or Hive table. The table must be at least validated. Requires the partition_expiration feature flag.

Request body: PartitionExpirationTrigger

FieldTypeDescription
manage_table_idUUIDRequired. The table's inventory row.
retention_daysintegerRequired. Number of days of partitions to keep, 1–36500. Partitions dated strictly before today minus retention_days are expired. The minimum of 1 prevents an accidental 0 from emptying the table.
prioritystringDefault: P3.
dry_runbooleanPreview what would be expired.
deferredbooleanExternal Hive tables only: record the dropped partitions' files and hard-delete them after ttl_days. Requires the partition_expiration_deferred flag. Can't be combined with dry_run.
ttl_daysinteger0–90. Required with deferred.
manifest_pathstringWhere to store the deletion manifest. Only valid with deferred.
{
  "manage_table_id": "8b1d…",
  "retention_days": 365,
  "dry_run": true
}

Response: 201 with action_id, entries_created, filter_expression (the derived delete filter), retention_days, and message.

ResponseDescription
201Run queued.
400Unsupported format, or no retention filter can be derived. For example, the table has no recorded date-partition pattern, or a multi-column date layout that can't be ordered by date.
403Partition expiration is disabled on this deployment.
404Table not found.
409The table isn't ready for maintenance yet.
422deferred on a table that isn't Hive, on a managed Hive table, or on an AWS Glue table; deferred expiration disabled; or validation failed.

List Partition Expiration Jobs

GET /api/v1/tables/{table_id}/partition-expiration

Scope: partition_exp_policy:read

Lists a table's partition-expiration runs.

ParameterInRequiredDescription
offsetqueryNoDefault: 0.
limitqueryNo1–1000. Default: 100.
statusqueryNoFilter by status.

Validate Partition Expiration Policy

POST /api/v1/tables/{table_id}/partition-expiration/validate

Scope: partition_exp_policy:write

Checks that a retention filter can be built for the table, without writing anything. Call it before saving a partition-expiration policy.

{ "retention_days": 90 }
ResponseDescription
200Returns table_id, retention_days, and the filter_expression that would be used.
400No filter can be derived. detail explains why.
404Table not found.

Delayed Deletions

Deferred vacuum and deferred Hive partition expiration don't delete files straight away. They record them as delayed deletions, which a sweep hard-deletes once their recovery window has passed. Until the sweep starts deleting a record, you can recover it.

The API paths, status values, and field names still use the original "pending" naming (/pending-deletions, PENDING_DELETE, pending_delete, total_bytes_pending).

A record's status moves from PENDING_DELETE to DELETING to HARD_DELETED. A failed deletion goes to FAILED, and a recovered record goes to RECOVERED. CANCELLED also exists. Once a record reaches DELETING, it can no longer be recovered.

Scope: Full-access keys only (all Delayed Deletions endpoints).

List Delayed Deletions

GET /api/v1/pending-deletions

Lists delayed-deletion records.

ParameterInRequiredDescription
offsetqueryNoDefault: 0.
limitqueryNo1–200. Default: 20.
statusqueryNoFilter by status.
table_idqueryNoFilter by table.
action_typequeryNoFilter by the action that created the record, such as vacuum or partition expiration.
vacuum_modequeryNoFilter by vacuum mode.

Each record includes file_count, total_bytes, file_manifest_path, hard_delete_at, recovery details (recovered_at, recovered_by, recovery_reason), and progress fields (deleted_offset, files_failed, deleting_since, attempts, error_message).

Get Delayed Deletion Stats

GET /api/v1/pending-deletions/stats

Returns record counts by status (pending_delete, deleting, recovered, hard_deleted, cancelled, failed), plus total_bytes_pending and total_files_pending.

ParameterInRequiredDescription
table_idqueryNoLimit to one table.

Get Delayed Deletion

GET /api/v1/pending-deletions/{deletion_id}

Returns one record. Returns 404 if it does not exist.

Recover Delayed Deletion

POST /api/v1/pending-deletions/{deletion_id}/recover

Cancels the hard-delete for a record that is still PENDING_DELETE, keeping its files. The status check and the change happen atomically: if the sweep has already started deleting the record, the call returns 409 rather than reporting success.

{
  "recovered_by": "jane@example.com",
  "recovery_reason": "Retention set too short"
}
FieldDescription
recovered_byRequired. Who is recovering, 1–255 characters. Recorded for audit.
recovery_reasonOptional, up to 1000 characters. Recorded as (no reason given) when omitted.
ResponseDescription
200Returns the recovered record.
404Record not found.
409The record isn't PENDING_DELETE. The response states its current status, for example DELETING.

Retry Delayed Deletion

POST /api/v1/pending-deletions/{deletion_id}/retry

Re-queues a FAILED record so the sweep tries again. Use it after fixing the cause of the failure, such as missing storage permissions.

  • A record that had nothing deleted goes back to PENDING_DELETE and can still be recovered.
  • A record that was partly deleted goes to DELETING and resumes where it stopped. It can't be recovered, because some of its files are already gone.
  • A recovery window that hasn't passed yet is still respected. The usual safety checks run again, so files that another table now references are not deleted.
{ "retried_by": "jane@example.com", "retry_reason": "Fixed bucket policy" }
ParameterInRequiredDescription
forcequeryNoRetry even if the deletion manifest is older than the staleness limit. Default: false.
ResponseDescription
200Returns the re-queued record.
404Record not found.
409The record isn't FAILED; or its manifest is too old, so the list of files to delete may be out of date (re-run vacuum, or pass force=true).

Catalog Connections

Catalog connections link Granica to your metadata catalogs. Granica syncs table metadata from them into its table inventory. Supported catalog_type values are databricks (Unity Catalog), hive_metastore, iceberg_rest (for example Polaris or Snowflake Horizon), and glue (AWS Glue Data Catalog).

Client secrets are encrypted when stored and never returned.

Connection fields

FieldApplies toDescription
nameallRequired. Unique name, 1–255 characters.
catalog_typealldatabricks (default), hive_metastore, iceberg_rest, or glue.
hostdatabricks, iceberg_restWorkspace URL or REST catalog base URL. Required for both.
client_iddatabricks, iceberg_restService principal or OAuth client ID. Required for Databricks. Optional for credential-only Iceberg REST, including Horizon JWTs.
client_secretdatabricks, iceberg_restOAuth client secret or credential-only JWT. Required for both.
default_catalogdatabricks, iceberg_restDatabricks: optional catalog filter (omit for all catalogs). Iceberg REST: required, the catalog (warehouse) name on the REST side.
metastore_id, workspace_iddatabricksOptional identifiers.
metastore_urihive_metastoreThrift URI. Required.
warehouse_pathhive_metastoreIceberg warehouse root. Required.
auth_typeiceberg_restAuthentication type. Only oauth2_client_credentials is supported.
rest_scopeiceberg_restOAuth2 scope for token requests.
realmiceberg_restPolaris realm, sent as the Polaris-Realm header. Omit for a single-realm catalog.
vended_credentialsiceberg_rest, glueUse short-lived, scoped storage credentials from the catalog instead of the deployment's own cloud permissions. Polaris vends them over the Iceberg REST protocol; Glue uses AWS Lake Formation. Not supported for databricks or hive_metastore.
aws_regionglueAWS region of the Data Catalog. Required; there is no default.
glue_catalog_idglueAWS account ID that owns the Data Catalog. Omit to use the deployment's own account.

Test Connection

POST /api/v1/catalog-connections/test

Scope: catalog_connections:write

Tests connection details without saving them, by listing the catalog's catalogs. Takes the same fields as Create Connection, minus name. To test an existing connection without re-entering its secret, pass its connection_id and leave client_secret blank; the stored secret is used. For Glue, vended_credentials: true also samples one table and asks Lake Formation for read credentials. A failure there is reported but doesn't fail the test.

Problems you can fix return a real 4xx. Temporary problems return 200 with success: false, so you can retry.

ResponseDescription
200success: true with catalogs, or success: false with error for a temporary problem: upstream 5xx, network, timeout, DNS, or Thrift transport. A Hive Metastore that can't be reached returns a stable error code with the host and port.
400Bad request, or the stored secret can no longer be decrypted (re-enter and save it).
401 / 403Authentication or authorization failed in the catalog.
404connection_id not found, or a catalog object is missing.
429The catalog's rate limit was hit.
503Secret encryption is unavailable on the server.

Create Connection

POST /api/v1/catalog-connections

Scope: catalog_connections:write

Creates a connection. Connections are shared across the platform, so overlapping ones are rejected to avoid syncing the same tables twice:

  • Databricks and Iceberg REST: same host and same catalog, or an "all catalogs" connection overlapping a specific one.
  • Hive Metastore: same metastore URI.
  • Glue: same region and account.

Response: 201 with the connection, without the secret.

ResponseDescription
201Connection created.
409The name is taken; the scope overlaps an existing connection; or a deleted connection with the same details exists (code: deleted_connection_exists, with its connection_id). Use Restore Connection to bring it back.
422A field required for this catalog_type is missing.

List Connections

GET /api/v1/catalog-connections

Scope: catalog_connections:read

Lists connections. Deleted connections are not included. Each connection includes sync_status, sync_error, last_synced_at, table_count, and managed_count.

ParameterInRequiredDescription
offsetqueryNoDefault: 0.
limitqueryNo1–1000. Default: 100.
is_activequeryNoFilter by active status.

Get Connection

GET /api/v1/catalog-connections/{connection_id}

Scope: catalog_connections:read

Returns one connection. Returns 404 if it does not exist.

Update Connection

PUT /api/v1/catalog-connections/{connection_id}

Scope: catalog_connections:write

Partially updates a connection. Send only the fields you want to change. A new client_secret is encrypted before it's stored. Changes to host or metastore_uri are checked to make sure they point at an allowed network address. You can also set is_active.

ResponseDescription
200Returns the updated connection.
404Connection not found.
409The new name is taken.

Delete Connection

DELETE /api/v1/catalog-connections/{connection_id}

Scope: catalog_connections:write

Deletes a connection. The deletion is soft: the connection's synced tables and crunch metrics are kept, but the connection disappears from every listing, stops syncing, and no new crunches are scheduled for its tables. You can bring it back with Restore Connection.

ParameterInRequiredDescription
confirmqueryYesMust be true.
ResponseDescription
204Deleted.
404Connection not found.
428confirm=true was not passed.

Restore Connection

POST /api/v1/catalog-connections/{connection_id}/restore

Scope: catalog_connections:write

Restores a deleted connection and starts a sync. Its tables and metrics reappear, and the connection keeps the same ID. The body uses the same fields as Create Connection, so you can re-enter credentials. A glue_catalog_id left out of the body keeps its stored value rather than being cleared.

ResponseDescription
200Returns the restored connection. A sync starts in the background.
404Connection not found.
409The connection isn't deleted, or another connection now uses its name.

Trigger Sync

POST /api/v1/catalog-connections/{connection_id}/sync

Scope: catalog_connections:write

Starts a metadata sync in the background. The sync also links any tables registered with POST /tables to their catalog entries.

ParameterInRequiredDescription
catalogqueryNoSync only this catalog.
modequeryNofull walks every table and detects deletions. incremental syncs only tables changed since the last sync (Unity Catalog only). Default: full.
ResponseDescription
200Sync started. Returns sync_status and message.
400mode isn't full or incremental.
404Connection not found.
409A sync is already running for this connection.

List Catalogs

GET /api/v1/catalog-connections/{connection_id}/catalogs

Scope: catalog_connections:read

Lists the synced catalogs for a connection.

ParameterInRequiredDescription
offsetqueryNoDefault: 0.
limitqueryNo1–1000. Default: 100.

List Schemas

GET /api/v1/catalog-connections/{connection_id}/catalogs/{catalog_name}/schemas

Scope: catalog_connections:read

Lists the synced schemas in a catalog. Takes offset and limit (1–1000, default 100).

List Tables (Catalog)

GET /api/v1/catalog-connections/{connection_id}/tables

Scope: catalog_connections:read

Lists synced catalog tables with filtering, sorting, and pagination.

ParameterInRequiredDescription
catalogqueryNoFilter by catalog.
schemaqueryNoFilter by schema.
prefixqueryNoFilter by table-name prefix.
searchqueryNoSearch the full table name.
formatqueryNoFilter by table format.
table_typequeryNoFilter by table type.
min_size_bytesqueryNoMinimum table size.
max_size_bytesqueryNoMaximum table size.
has_partitionsqueryNoFilter by whether the table is partitioned.
sort_byqueryNoSort field. Default: full_name.
sort_orderqueryNoasc or desc. Default: asc.
offsetqueryNoDefault: 0.
limitqueryNo1–1000. Default: 100.

Each table includes its location, format, owner, size, row and column counts, and partition columns, plus three linking fields:

FieldDescription
manage_table_idThe table's inventory row: the ID the policy endpoints take. It is not the same as id, which identifies the catalog entry. It can be null briefly right after a sync.
onboarding_table_idThe table_id of the onboarding registration linked to this table, or null.
linkedtrue when an onboarding registration is linked. A registration made before the catalog was synced is linked on the next sync.

Get Table Detail (Catalog)

GET /api/v1/catalog-connections/{connection_id}/tables/{full_name}

Scope: catalog_connections:read

Returns everything synced for one catalog table: the list fields above plus columns, format_properties, catalog_properties, column_statistics, table_constraints, effective_permissions, and raw_metadata. full_name may contain dots and slashes. Returns 404 if the table isn't found.


Optimus (Query Optimization)

Optimus analyzes your query logs and recommends a layout for each table: sort, Z-order, and partition-level sort columns. An Optimus submission (a "connection" in the console) points at a query-log location and runs once a day. Each daily run produces a fresh set of recommendations. Applying a recommendation writes it into the table's crunch policy, so the regular crunch scheduler carries it out.

In the URLs below, run_id and submission_id both refer to the submission's ID.

Scope: Full-access keys only (all Optimus endpoints).

Create Optimus Run

POST /api/v1/optimus/runs

Creates a submission and starts its first run immediately, whatever daily_sync_time_utc is set to.

Request body: OptimusRunCreate

FieldTypeDescription
query_logs_uristringRequired. Storage URI of the query log files.
engine_typestringEngine that produced the logs: trino (default), spark, athena, or snowflake.
lookback_daysintegerHow many days of logs to score, 1–365. Default: 7. The partition layout under query_logs_uri is detected automatically. If detection fails, logs are filtered by creation time over the same window.
end_datedateLast day of the window, inclusive. Default: today (UTC). Use it to replay a past period: end_date=2024-06-07 with lookback_days=7 scores 2024-06-01 to 2024-06-07. It applies to the first run only; daily runs always end today.
daily_sync_time_utcstringTime of the daily run, HH:MM in UTC. Default: 06:00.
namestringLabel shown in the console. Defaults to the end of the URI.
recommendation_enginestringOverride the platform's default recommendation engine for this submission. It doesn't affect which engine crunches the table later.
configobjectExtra configuration for the scoring job.
created_bystringAudit actor.
traceparentstringOptional W3C trace context.
ResponseDescription
201Submission created and first run started.
400Invalid request.
502The run could not be started. The submission and run are marked failed, with the error recorded.

Get Optimus Run

GET /api/v1/optimus/runs/{run_id}

Returns the submission's settings and a latest_run summary, so you can see today's status in one call. Returns 404 if not found.

Update Optimus Submission

PATCH /api/v1/optimus/runs/{run_id}

Partially updates a submission. Send only the fields you want to change.

FieldDescription
activefalse pauses daily runs and true resumes them. Pausing keeps all past runs and recommendations. Days missed while paused are not run later.
nameLabel. An empty string clears it.
lookback_days1–365. Takes effect from the next daily run.
daily_sync_time_utcHH:MM UTC. Takes effect from the next daily run.
query_logs_uriMove to a different log location. Takes effect from the next daily run.

Today's run, if there is one, isn't affected. Returns 404 if not found.

Sync Optimus Submission Now

POST /api/v1/optimus/runs/{submission_id}/sync-now

Starts a run right away, outside the daily schedule. If today already has a run, whether running, succeeded, or failed, it's reset and started again. Unlike Retry, this works in any status.

ParameterInRequiredDescription
sourcequeryNomanual (default) always resets and restarts today's run. scheduled (used by the daily scheduler) does nothing if today's run already succeeded, so an earlier manual sync is never overwritten.

Returns 201 with the run. Returns 404 if the submission doesn't exist.

Retry Optimus Run

POST /api/v1/optimus/runs/{submission_id}/retry

Retries a failed submission. Today's run is reused, or a new one is created if today has none. The retry uses the submission's original recommendation engine, even if the platform default has changed since.

ResponseDescription
201Retry started.
404Submission not found.
422The submission isn't failed.

Delete Optimus Submission

DELETE /api/v1/optimus/runs/{submission_id}

Permanently deletes a submission with all its runs, recommendations, and daily statistics. To keep the history, pause the submission with PATCH and "active": false instead. Returns 204, or 404 if not found.

List Optimus Recommendations

GET /api/v1/optimus/runs/{run_id}/recommendations

Lists recommendations for each table from the submission's latest run only. Returns an empty list if no run has completed yet.

ParameterInRequiredDescription
offsetqueryNoDefault: 0.
limitqueryNo1–1000. Default: 100.

Apply Optimus Recommendation

POST /api/v1/optimus/recommendations/{recommendation_id}/apply

Applies a recommendation to a table's crunch policy. A new policy version is created from the recommendation and linked to it. The crunch scheduler then uses the recommended layout on the next scheduled run; there is no separate Optimus job.

Request body: OptimusRecommendationApplyRequest

FieldTypeDescription
manage_table_idUUIDRequired. The table that receives the policy.
target_file_size_bytesintegerTarget file size for the generated policy. Default: 128 MiB.
run_time_utcstringDaily run time, HH:MM. Default: 02:00.
lookback_start, lookback_endintegerLookback window. Defaults: 2 and 1. Start must be greater than or equal to end.
enable_auto_applybooleanAlso turn on automatic apply for this table in the same transaction, so later recommendations are applied without review. Default: false.
created_bystringAudit actor.

Response: 200 with applied_policy_version_id, policy_version, policy_document, job_context, and auto_apply_optimus.

ResponseDescription
200Recommendation applied.
404Recommendation not found.
422The recommendation can't be applied to this table.

Auto-Apply Sweep

POST /api/v1/optimus/runs/{run_id}/auto-apply-sweep

Applies every eligible recommendation from the latest run. Granica calls this automatically after each Optimus run. A recommendation is eligible when:

  • its action is APPLY and its type isn't SKIP;
  • it hasn't been applied already;
  • its table exists in the inventory; and
  • automatic apply is turned on for that table (see Set Policy Preferences).

If a single recommendation fails, the call still succeeds: failures are listed in failed for review.

List Optimus Tables With Recommendations

GET /api/v1/optimus/runs/{run_id}/tables

Lists tables that have ever had a recommendation from this submission, one entry per table. Each entry includes the latest recommendation's latest_action and latest_opt_type, so you can see which tables have APPLY recommendations and which only have advisory or SKIP ones. Returns 404 if the submission isn't found.

Get Optimus Table Metrics

GET /api/v1/optimus/runs/{run_id}/tables/{table_fqn}/metrics

Returns daily query metrics for one table, with markers on the days recommendations were made, so you can see whether a recommendation helped. Markers are placed on the date the recommendation was created.

ParameterInRequiredDescription
daysqueryNoWindow size in days, including today, 1–365. Default: 90.

Object Maintenance

Object Maintenance brings raw object-storage data (for example, Parquet files under S3 prefixes that aren't registered in any catalog) under Granica management.

  1. Register an inventory report that points at an S3 Inventory manifest, or register prefixes manually.
  2. Discovery scans the inventory, filters out prefixes that aren't worth maintaining (too small, too recent, archived, owned by another catalog, or blocklisted), and turns the rest into managed prefixes.
  3. Enable a prefix, or save a policy or trigger an action on it, to onboard it. Its lifecycle moves from unmanaged to active, and Granica collects its metadata, which takes 20–30 minutes.
  4. Crunch runs on the prefix through its policy or through on-demand actions.

Scope: Full-access keys only (all Object Maintenance endpoints). The object_maintenance feature must be enabled on your deployment.

Field naming: Object Maintenance requests accept either camelCase or snake_case field names. Responses use camelCase.

Errors and lifecycle

Lifecycle errors include extra fields in the problem response. An invalid transition returns 422 with allowed_transitions, which lists the actions that are valid from the prefix's current state.

Lifecycle responses (LifecycleStateResponse) have the same shape for every transition:

FieldDescription
prefixIdThe managed prefix.
stateunmanaged, active, paused, or error.
onboardingStatus, lastErrorProgress of metadata collection for the linked table.
onboardingTableIdThe linked table_id, for reference only.
reconciliationHow the linked table came about: created, reused-from-table-maintenance, reused-from-prior-onboarding, already-linked-at-discovery, or already-enabled. Pause, resume, and disable leave it null.
_linksLinks to the prefix's self, policy, actions, and runs resources. Treat these URLs as opaque.
_allowedTransitionsActions valid from the current state: enable, pause, resume, disable, or refresh.

Create Inventory Report

POST /api/v1/object-maintenance/inventory-reports

Registers an inventory report.

Request body: InventoryReportCreate

FieldTypeDescription
namestringRequired. Unique display name.
descriptionstringNotes shown in the console.
uristringStorage URI (s3://, gs://, abfss://) that limits the report's scope. Optional: when omitted, the scope comes from the manifest's source bucket on the first discovery.
inventoryUristringRequired. Manifest location, for example s3://.../manifest.json.
inventoryFormatstringRequired. parquet (recommended), orc, or csv.
discoveryCadencestringHow often discovery re-runs in the background: daily or weekly (default). Manual discovery runs are separate from this.
runNowbooleanStart a discovery straight after creating the report. Default: false.
skipAgeDaysintegerSkip prefixes whose newest object is less than N days old. 0 applies no age cutoff, which isn't the same as leaving it out (leaving it out uses the global setting).
minPrefixSizeBytesintegerMinimum readable size for a prefix to qualify. 0 sets no minimum. Omit to use the global setting.
catalogClaimThresholdPctnumber0–100. If at least this share of a prefix's objects are in an unrecognized format, the prefix is treated as belonging to another catalog. Default: 90.
eligibleStorageClassesstring listStorage classes that crunch may read directly. Anything else counts as archival. Default: STANDARD only. An empty list turns the check off. Only prefixes that are entirely archival are skipped. GLACIER_IR is readable but charges per GB retrieved.
interestingPrefixesstring listOnly scan manifest entries under these prefixes.
extraSentinelGlobsstring listExtra glob patterns for marker files (for example, files that indicate another system manages the data), added to the default set.
binSizeOverrideBytesintegerSize of each discovery work unit, 64 MiB–1 TiB. Defaults to a computed value.
confirmExtensionlessFormatsbooleanAfter each discovery, read a sample object's first bytes to confirm the format of prefixes whose files have no extension (for example part-00000). Costs two small ranged reads per prefix, and the API needs s3:GetObject on the bucket.
ResponseDescription
201Report created.
409The name is taken, or the scope conflicts with another report.
422Validation failed, for example an invalid URI or a missing inventoryUri or inventoryFormat.

List Inventory Reports

GET /api/v1/object-maintenance/inventory-reports

Lists inventory reports. Takes offset and limit (1–200, default 50).

Get Inventory Report

GET /api/v1/object-maintenance/inventory-reports/{inventory_report_id}

Returns one report. Returns 404 if not found.

Update Inventory Report

PATCH /api/v1/object-maintenance/inventory-reports/{inventory_report_id}

Partially updates a report. Accepts description, enabled, skipAgeDays, discoveryCadence, interestingPrefixes, extraSentinelGlobs, minPrefixSizeBytes, catalogClaimThresholdPct, eligibleStorageClasses, confirmExtensionlessFormats, and binSizeOverrideBytes (null clears the override). Returns 404 if not found.

Delete Inventory Report

DELETE /api/v1/object-maintenance/inventory-reports/{inventory_report_id}

Deletes a report. Its managed and discovered prefixes are kept, detached from any report, so their history, policies, and actions survive. If you register a report for the same prefix later, they reattach to it. Returns 204, or 404 if not found.

Trigger Discovery

POST /api/v1/object-maintenance/inventory-reports/{inventory_report_id}/discover

Queues a discovery run for a report. The scan runs as a background Spark job, so inventories with millions of objects are fine.

ResponseDescription
200Discovery queued.
404Report not found.
409Discovery is already running for this report. Manually registered prefixes have no discovery step.
429Discovery ran very recently. The message says how long to wait.

List Discovered Prefixes

GET /api/v1/object-maintenance/inventory-reports/{inventory_report_id}/discovered-prefixes

Lists the results of the report's most recent completed discovery only, so results from different runs aren't mixed. Takes offset and limit (1–200, default 50).

List Managed Prefixes

GET /api/v1/object-maintenance/inventory-reports/{inventory_report_id}/managed-prefixes

Lists a report's managed prefixes. Takes offset and limit (1–200, default 50).

Register Manual Prefixes

POST /api/v1/object-maintenance/prefixes/manual

Registers 1–100 prefixes directly, without an inventory report or a discovery run. Registration is atomic: either every prefix in the batch is registered or none is.

{
  "prefixes": [
    { "uri": "s3://bucket/landing/events/", "fileFormat": "parquet" }
  ]
}

Each uri must be an absolute S3, GCS, or Azure URI without query parameters. fileFormat must be parquet. Duplicates within the batch are rejected, including URIs that differ only in scheme or trailing slash.

ResponseDescription
200Returns the registered prefixes.
409Prefixes in the batch overlap each other or an existing prefix; the prefix is already available through an inventory report; it already has a different file type; or it was registered concurrently.
422The prefix matches a skip blocklist entry.

Get Prefix Metadata

GET /api/v1/object-maintenance/prefix-metadata

Returns metadata for up to 100 prefixes in one call.

ParameterInRequiredDescription
prefix_idsqueryYes1–100 prefix IDs. Repeat the parameter for each ID.

List Prefixes

GET /api/v1/object-maintenance/prefixes

Lists managed prefixes across all reports. Each row includes a summary of its parent report.

ParameterInRequiredDescription
offsetqueryNoDefault: 0.
limitqueryNo1–1000. Default: 50.
inventory_report_idqueryNoLimit to one report.
searchqueryNoText search on the prefix URI.
search_reportsqueryNoAlso search report names. Default: false.
sort_byqueryNocreated_at (default), prefix_uri, object_count, or total_size_bytes.
sort_orderqueryNoasc or desc (default).
include_summaryqueryNoInclude summary totals. Default: false.
min_size_bytesqueryNoMinimum prefix size.
onboarding_candidatesqueryNoOnly prefixes that can be onboarded. Default: false.
onboarded_onlyqueryNoOnly onboarded prefixes. Default: false.
management_statequeryNounmanaged, active, paused, or error.
source_statequeryNopresent or missing (the data has disappeared from storage).

Get Prefix

GET /api/v1/object-maintenance/prefixes/{prefix_id}

Returns one managed prefix with a summary of its parent report. It also includes the linked table's onboarding status and error, and the estimated data reduction rate from recipe learning (estDrrAvg, min, and max). Returns 404 if not found.

Enable Maintenance

POST /api/v1/object-maintenance/inventory-reports/{inventory_report_id}/prefixes/{prefix_id}/enable

POST /api/v1/object-maintenance/prefixes/{prefix_id}/enable

Enables maintenance on a prefix, moving it from unmanaged to active. Granica creates a table for the prefix, or reuses one already registered at the same location, and schedules metadata collection. The call returns as soon as the link is in place; metadata collection (20–30 minutes) runs afterwards. reconciliation in the response says how the table came about.

The call is idempotent: enabling a prefix that's already active returns 200 with reconciliation: already-enabled.

ResponseDescription
200Already enabled. Nothing changed.
201Enabled, with a new or reused table.
404Prefix or report not found, or the prefix belongs to a different report.
409The prefix's report is missing (reconnect it first), the prefix changed during the request, or it is detached from any report.
422Invalid lifecycle transition, or a manually registered prefix has no file type set.

Pause, Resume, Disable

POST /api/v1/object-maintenance/prefixes/{prefix_id}/pause

POST /api/v1/object-maintenance/prefixes/{prefix_id}/resume

POST /api/v1/object-maintenance/prefixes/{prefix_id}/disable

Change a prefix's lifecycle state. Each returns a LifecycleStateResponse.

  • Pause (active → paused): no new crunch jobs start. Queued and running jobs finish. To stop a specific job, use Cancel Crunch Job.
  • Resume (paused → active): scheduling starts again on the scheduler's next run.
  • Disable (active, paused, or error → unmanaged): no new jobs start. The link to the table, the crunch history, and the policies are all kept, so enabling the prefix again picks up where it left off.
ResponseDescription
200State changed.
404Prefix not found.
422The transition isn't valid from the current state. See allowed_transitions.

Refresh Prefix

POST /api/v1/object-maintenance/prefixes/{prefix_id}/refresh

Re-runs metadata collection and recipe generation (20–30 minutes) for an active prefix, without creating a new table. The lifecycle state doesn't change.

ResponseDescription
200Refresh queued.
404Prefix not found.
409Recipe generation is already running. Try again later.
422No recipe exists yet because the first metadata collection hasn't finished, or the transition is invalid. Refresh isn't possible until the first recipe exists.

Get Prefix Policy

GET /api/v1/object-maintenance/prefixes/{prefix_id}/policy

Returns the prefix's active policy and version. Returns 404 if the prefix has no policy.

Upsert Prefix Policy

PUT /api/v1/object-maintenance/prefixes/{prefix_id}/policy

Saves a new active policy version for the prefix. The policy document has the same format as for table policies. Saving a policy on an unmanaged prefix activates it automatically.

{
  "policyDocument": { "policies": [ { "id": "crunch", "enabled": true, "schedule": { "scheduleType": "daily", "runTimeUtc": "03:00" } } ] },
  "changeSummary": "Nightly crunch"
}

When a crunch policy turns on automatic recipe selection, the resulting crunch settings are checked as well. Returns 409 if the save conflicts.

Delete Prefix Policy

DELETE /api/v1/object-maintenance/prefixes/{prefix_id}/policy

Deletes the prefix's policy and all its versions. Returns 204, or 404 if the prefix has no policy.

List Prefix Policy Versions

GET /api/v1/object-maintenance/prefixes/{prefix_id}/policy/versions

Returns the policy's version history, newest first. isActive marks the live version. A prefix with no policy returns { "versions": [], "total": 0 } rather than 404.

Trigger Prefix Action

POST /api/v1/object-maintenance/prefixes/{prefix_id}/actions

Queues an on-demand action on a prefix and returns straight away. The scheduler then creates one crunch job for each date partition, or a single job if the prefix isn't partitioned. Triggering an action on an unmanaged prefix activates it automatically.

FieldDescription
actionTypecrunch (default).
priority1 (highest) to 5. P1–P5 strings are also accepted. Default: 3.
payloadSame fields as the Trigger Crunch body, without manage_table_id: cluster_columns, lookback_start, lookback_end, backfill_start_date, backfill_end_date, and job_context. scope is incremental (a date range) or full (the whole prefix; omit any dates).

Returns 201 with the action, or 409 if it conflicts with the prefix's state.

List Prefix Actions

GET /api/v1/object-maintenance/prefixes/{prefix_id}/actions

Lists the prefix's actions, newest first. Takes offset and limit (1–200, default 50).

List Prefix Runs

GET /api/v1/object-maintenance/prefixes/{prefix_id}/runs

Lists every job run for the prefix (crunch and maintenance) in a single timeline. Takes offset and limit (1–200, default 50).

Format Candidates

GET /api/v1/object-maintenance/inventory-reports/{inventory_report_id}/format-candidates

Lists prefixes whose format couldn't be confirmed from file names, ordered by unconfirmed bytes (largest first), so the most valuable prefixes come first. Read-only. Takes limit (1–500, default 100) and offset.

Confirm Formats

POST /api/v1/object-maintenance/inventory-reports/{inventory_report_id}/confirm-formats

Confirms the format of candidate prefixes now, instead of waiting for the next discovery. For each prefix, it reads the first few KB of one object. This works because one job writes a prefix with one writer, so a single object is representative. A prefix that can't be read (archival storage, missing permissions, or object gone) stays unconfirmed, and one bad object doesn't fail the batch. The call runs whether or not confirmExtensionlessFormats is set on the report.

ParameterInRequiredDescription
max_prefixesqueryNoMaximum number of prefixes to check in this call, 1–1000. Default: 200. The response says what was checked, so you can page through a large backlog.
offsetqueryNoDefault: 0.

Discovery runs

Each discovery is tracked as a discovery schedule with its own history. Use these endpoints to monitor a discovery and control it.

EndpointDescription
GET /api/v1/object-maintenance/inventory-reports/{inventory_report_id}/discovery/schedulesThe report's discovery history, most recent first. Takes offset and limit (1–200, default 50).
GET /api/v1/object-maintenance/discovery/schedules/{schedule_id}Full detail for one discovery.
GET /api/v1/object-maintenance/discovery/schedules/{schedule_id}/stateLive progress, including skip counts for each filter. The console polls it every 5 seconds while a discovery is running.
GET /api/v1/object-maintenance/discovery/schedules/{schedule_id}/planThe plan: number of work units, total inventory bytes, and estimated duration. Available before scanning starts.
POST /api/v1/object-maintenance/discovery/schedules/{schedule_id}/pausePause a running discovery. Its running task is stopped. Progress is saved after each completed work unit.
POST /api/v1/object-maintenance/discovery/schedules/{schedule_id}/resumeResume a paused discovery from the next unfinished work unit.
POST /api/v1/object-maintenance/discovery/schedules/{schedule_id}/restartMark the run failed and queue a new one, atomically. Returns the new schedule ID. Returns 409 for a completed run (trigger a new discovery instead), when another run is already active for the report, or when the report has been deleted.
POST /api/v1/object-maintenance/discovery/schedules/{schedule_id}/skip-bin/{bin_id}Skip one stuck work unit without restarting the discovery. Optional body: { "skipReason": "..." }. Returns 409 if the run hasn't saved any progress yet (restart it instead).
GET /api/v1/object-maintenance/discovery/schedules/{schedule_id}/effective-configThe discovery's settings at each level (defaults, global settings, report overrides), with the source of each final value. Useful when skip results look wrong.

Pause and resume return 409 if the run isn't in a state that allows it.

Skip Blocklist

The skip blocklist stops matching prefixes from becoming managed prefixes during discovery.

EndpointDescription
GET /api/v1/object-maintenance/skip-blocklistList every entry, including disabled ones, so you can see rules that are switched off.
POST /api/v1/object-maintenance/skip-blocklistAdd an entry: uriPattern, patternType (exact, prefix, or glob), reason, and enabled (default true). Returns 201, or 409 if the same pattern already exists.
PATCH /api/v1/object-maintenance/skip-blocklist/{entry_id}Update an entry. Fields you leave out are unchanged; for example, send { "enabled": false } to disable it. Built-in system entries can't be edited (403); add a narrower entry of your own instead.
DELETE /api/v1/object-maintenance/skip-blocklist/{entry_id}Remove an entry. System entries can't be deleted (403); disable them instead.

Blocklist changes apply from the next discovery completion. They aren't applied to the past: prefixes already managed stay managed, and prefixes an entry used to block return on the next discovery.

Deprecated: Locations

The /object-maintenance/locations endpoints are deprecated aliases for inventory reports. They are kept during the transition and will be removed. Use the inventory-reports paths instead:

DeprecatedReplacement
GET, POST /object-maintenance/locations/object-maintenance/inventory-reports
GET, PATCH, DELETE /object-maintenance/locations/{location_id}/object-maintenance/inventory-reports/{inventory_report_id}
POST /object-maintenance/locations/{location_id}/discover.../inventory-reports/{inventory_report_id}/discover
GET /object-maintenance/locations/{location_id}/discovered-prefixes.../inventory-reports/{inventory_report_id}/discovered-prefixes
GET /object-maintenance/locations/{location_id}/managed-prefixes.../inventory-reports/{inventory_report_id}/managed-prefixes
GET /object-maintenance/locations/{location_id}/discovery/schedules.../inventory-reports/{inventory_report_id}/discovery/schedules
POST /object-maintenance/locations/{location_id}/prefixes/{prefix_id}/enable.../inventory-reports/{inventory_report_id}/prefixes/{prefix_id}/enable
GET /object-maintenance/locations/{location_id}/format-candidates.../inventory-reports/{inventory_report_id}/format-candidates
POST /object-maintenance/locations/{location_id}/confirm-formats.../inventory-reports/{inventory_report_id}/confirm-formats
Was this page helpful?

On this page

Overview
Authentication and API keys
Identifiers
Errors
Pagination
Table formats
Priorities
Health
Health Check
Configuration
Get Config
Update Config
Get Slot Info
Tables
List Tables
Create Table
Get Table
Update Table
Delete Table
Refresh Inventory
Get Engine Readiness
Onboarding
Get Onboarding Status
Retry Onboarding
Cancel Onboarding
Table Policies
Policy document
Create or Replace Policy
Validate Policy
Get Active Policy
List Policy Versions
Validate Action
Set Policy Preferences
Schedules
Sub-daily cadences
Create Schedule
Get Schedule
Update Schedule
Delete Schedule
Crunch
Trigger Crunch
JobContext
List Table Crunch Jobs
List All Crunch Jobs
Get Crunch Job With Metrics
Cancel Crunch Job
Retry Crunch Job
Vacuum
Trigger Vacuum
List Table Vacuum Jobs
Trigger Hard Delete
Partition Expiration
Trigger Partition Expiration
List Partition Expiration Jobs
Validate Partition Expiration Policy
Delayed Deletions
List Delayed Deletions
Get Delayed Deletion Stats
Get Delayed Deletion
Recover Delayed Deletion
Retry Delayed Deletion
Catalog Connections
Connection fields
Test Connection
Create Connection
List Connections
Get Connection
Update Connection
Delete Connection
Restore Connection
Trigger Sync
List Catalogs
List Schemas
List Tables (Catalog)
Get Table Detail (Catalog)
Optimus (Query Optimization)
Create Optimus Run
Get Optimus Run
Update Optimus Submission
Sync Optimus Submission Now
Retry Optimus Run
Delete Optimus Submission
List Optimus Recommendations
Apply Optimus Recommendation
Auto-Apply Sweep
List Optimus Tables With Recommendations
Get Optimus Table Metrics
Object Maintenance
Errors and lifecycle
Create Inventory Report
List Inventory Reports
Get Inventory Report
Update Inventory Report
Delete Inventory Report
Trigger Discovery
List Discovered Prefixes
List Managed Prefixes
Register Manual Prefixes
Get Prefix Metadata
List Prefixes
Get Prefix
Enable Maintenance
Pause, Resume, Disable
Refresh Prefix
Get Prefix Policy
Upsert Prefix Policy
Delete Prefix Policy
List Prefix Policy Versions
Trigger Prefix Action
List Prefix Actions
List Prefix Runs
Format Candidates
Confirm Formats
Discovery runs
Skip Blocklist
Deprecated: Locations