admin command group provides advanced administrative operations for managing Cadence clusters, debugging workflows, and performing maintenance tasks.
Command Overview
adm
Admin Workflow Commands
admin workflow show
Show workflow history directly from database.TreeID for history tree
BranchID for history branch
Shard ID containing the workflow
Minimum event ID to read
Maximum event ID to read
admin workflow describe
Show internal workflow execution information.Workflow ID
Run ID (defaults to current)
admin workflow refresh-tasks
Refresh all tasks for a workflow.admin workflow delete
Delete workflow execution and mutable state from database.Continue on errors when deleting history
Execute deletion on server side (recommended)
admin workflow fix_corruption
Check and clean up corrupted workflow records.Skip errors and delete as much as possible
Shard Management Commands
admin shard describe
Describe shard information.Shard ID to describe
admin shard list
List shard distribution across history hosts.Number of results per page
Page offset for pagination
admin shard closeShard
Close a shard to force rebalancing.admin shard removeTask
Remove a specific task from a shard.Task type: 2 (transfer), 3 (timer), 4 (replication), 6 (cross-cluster)
Task visibility timestamp (required for timer tasks)
Target cluster (required for cross-cluster tasks)
admin shard timers
Get scheduled timers for a time range.Start date in RFC3339 format
End date in RFC3339 format
Filter by timer types (0-6)
Print raw JSON instead of histogram
Domain Admin Commands
admin domain getdomainidorname
Get domain ID from name or name from ID.admin domain list
List all domains in cluster.List all domains regardless of status
List only deprecated domains
Filter by domain name prefix
ElasticSearch Admin Commands
admin elasticsearch catIndex
Show ElasticSearch indices.admin elasticsearch index
Index documents to ElasticSearch.admin elasticsearch delete
Delete documents from ElasticSearch.Task List Admin Commands
admin tasklist describe
Show detailed task list information.admin tasklist list
List all active task lists in a domain.admin tasklist update-partition
Update task list partition configuration.Number of read partitions
Number of write partitions
Force potentially unsafe update
Cluster Admin Commands
admin cluster describe
Show cluster information.admin cluster add-search-attr
Whitelist a custom search attribute.Search attribute key name
Type: 0 (String), 1 (Keyword), 2 (Int), 3 (Double), 4 (Bool), 5 (Datetime)
DLQ (Dead Letter Queue) Commands
admin dlq count
Count DLQ messages.DLQ type: domain or history
Force fetch latest counts (additional DB load)
admin dlq read
Read DLQ messages.Comma-separated shard IDs or ranges (e.g., “2,5-6,10”)
Source cluster name
Maximum messages to read
admin dlq purge
Delete DLQ messages.admin dlq merge
Merge DLQ messages back into main queue.Database Commands
admin database scan
Scan database for corrupted workflows.Scan type: ConcreteExecutionType, CurrentExecutionType, etc.
Collections to check during scan
admin database clean
Clean up corrupted workflows found by scan.admin database decode_thrift
Decode Thrift-encoded data.Input encoding: hex or base64
Dynamic Config Commands
admin config get
Get dynamic config value.admin config update
Update dynamic config value.admin config restore
Restore config to default value.admin config list
List all configured dynamic config values.admin config listall
List all available dynamic config keys.Database Connection Flags
Many admin commands require database connection:Database type: cassandra, mysql, postgres
Database host address
Database port
Keyspace/database name
Database username
Database password
Best Practices
- Database Access: Use read-only credentials when possible
- Backups: Always backup before destructive operations
- Testing: Test admin commands in non-production first
- Monitoring: Watch metrics during and after admin operations
- Documentation: Document all admin operations performed
- Permissions: Restrict admin command access appropriately
Next Steps
Workflow Commands
Standard workflow operations
Domain Commands
Domain management
Operations Guide
Learn about Cadence operations
Disaster Recovery
Recovery and troubleshooting