v1

latestOpenAPI 3.0.02026-07-17101223.2 KB
Optimization

Create or update scheduled task

Creates a new scheduled task or updates an existing one for table optimization

post/api/optimize/{catalog}/{namespace}/{table}/schedule

Path parameters

catalogstring required

The catalog name

namespacestring required

The namespace name

tablestring required

The table name

Request body

taskNamestring

Name of the scheduled task

cronExpressionstring required

Cron expression for scheduling

enabledboolean

Whether the task is enabled

snapshotRetentionboolean

Enable snapshot retention cleanup

retentionPeriodinteger

Retention period in milliseconds

minSnapshotsToKeepinteger

Minimum number of snapshots to keep

orphanFileDeletionboolean

Enable orphan file deletion

orphanFileRetentioninteger

Orphan file retention period in milliseconds

compactionboolean

Enable table compaction

targetFileSizeBytesinteger

Target file size for compaction in bytes

strategystring

Compaction strategy (e.g., binpack, sort)

sortOrderstring

Sort order for compaction

whereClausestring

WHERE clause to filter data during compaction

createdBystring

User who created the task

Response

Scheduled task created/updated successfully

successboolean required
messagestring required
taskIdinteger
taskNamestring
cronExpressionstring
cronDescriptionstring
enabledboolean
createdboolean

Whether this was a create operation

updatedboolean

Whether this was an update operation