Overview
The Admin Service is an internal gRPC service that exposes administrative endpoints for:- Workflow execution management and debugging
- Shard management and operations
- Cluster administration and remote cluster management
- Dead letter queue (DLQ) operations
- Search attributes management
- Replication task management
- Task queue administration
Service Methods
Workflow State Management
RebuildMutableState
Rebuilds the mutable state of a workflow execution from history events.The namespace of the workflow execution
The workflow execution identifier containing workflow_id and run_id
Empty response on success
DescribeMutableState
Retrieves detailed information about the mutable state of a workflow execution.The namespace of the workflow execution
The workflow execution identifier
Cached mutable state information in JSON format
Current mutable state from the database
ImportWorkflowExecution
Imports a workflow execution from external source.Target namespace for the imported workflow
Workflow execution details
History event batches to import
DeleteWorkflowExecution
Permanently deletes a workflow execution and all its data.The namespace of the workflow
The workflow execution to delete
Empty response on successful deletion
Shard Management
GetShard
Retrieves information about a specific history shard.The ID of the shard to retrieve
Detailed information about the shard including range_id, owner, and state
CloseShard
Closes a shard, releasing its ownership.The ID of the shard to close
Empty response on success
ListHistoryTasks
Lists tasks for a specific shard and category.The shard ID to list tasks from
Task category (transfer, timer, replication, visibility)
Optional range to filter tasks
List of tasks matching the criteria
RemoveTask
Removes a specific task from a shard.The shard ID containing the task
The task category
The task ID to remove
Cluster Management
DescribeCluster
Returns detailed information about the Temporal cluster.Name of the cluster
Total number of history shards
Unique cluster identifier
Server version information
ListClusters
Lists all configured clusters including remote clusters.Maximum number of results per page
Token for pagination
List of cluster information
ListClusterMembers
Lists all members of the cluster by role.Optional filter by service role (frontend, history, matching, worker)
Maximum number of results per page
List of cluster members with their roles and addresses
AddOrUpdateRemoteCluster
Adds or updates a remote cluster configuration for cross-cluster replication.Frontend address of the remote cluster
Whether to enable connection to the remote cluster
RemoveRemoteCluster
Removes a remote cluster configuration.Name of the remote cluster to remove
Replication Management
GetReplicationMessages
Retrieves replication messages for cross-cluster replication.Target cluster name
Last received message ID for pagination
Batch of replication tasks
GetNamespaceReplicationMessages
Retrieves namespace replication messages.Target cluster name
Last message ID
Namespace replication tasks
StreamWorkflowReplicationMessages
Streams workflow replication messages (bidirectional streaming).Replication synchronization state
Stream of replication messages
ResendReplicationTasks
Resends replication tasks for a workflow execution.Namespace of the workflow
Workflow execution identifier
Starting event ID for resending
Ending event ID
DLQ Operations
GetDLQMessages
Retrieves messages from a dead letter queue.Type of DLQ (replication or namespace)
Source cluster for replication DLQ
Shard ID for shard-specific DLQ
Maximum messages to return
DLQ messages
PurgeDLQMessages
Purges messages from a DLQ up to a specific message ID.Type of DLQ
Source cluster name
Purge up to and including this message ID
MergeDLQMessages
Merges DLQ messages back into the main queue.Type of DLQ
Source cluster name
Merge up to this message ID
GetDLQTasks
Retrieves tasks from the DLQ with pagination.DLQ identifier containing queue type and source cluster
Number of tasks to retrieve
Pagination token
PurgeDLQTasks
Purges tasks from the DLQ.DLQ identifier
Purge up to this task
MergeDLQTasks
Merges DLQ tasks back into processing.DLQ identifier
Merge up to this task
Search Attributes
AddSearchAttributes
Adds new custom search attributes to the cluster.Map of attribute names to types (Text, Keyword, Int, Double, Bool, Datetime, KeywordList)
Namespace for the search attributes
RemoveSearchAttributes
Removes custom search attributes from a namespace.Names of search attributes to remove
Namespace containing the attributes
GetSearchAttributes
Retrieves all search attributes for a namespace.Namespace to query
Custom search attributes
System-defined search attributes
History Operations
GetWorkflowExecutionRawHistoryV2
Retrieves raw history events for a workflow execution.Namespace of the workflow
Workflow execution identifier
Starting event ID (default: 1)
Ending event ID
Maximum events per page
Token for pagination
Raw history event batches
Token for next page
ReapplyEvents
Reapplies specific events to a workflow execution.Namespace of the workflow
Workflow execution identifier
Events to reapply
Task Queue Operations
GetTaskQueueTasks
Retrieves tasks from a task queue.Namespace of the task queue
Task queue name
Type (workflow or activity)
Maximum tasks to retrieve
List of task queue tasks
RefreshWorkflowTasks
Refreshes workflow tasks for an execution.Namespace of the workflow
Workflow execution identifier
Health and Diagnostics
DescribeHistoryHost
Returns information about a history service host.Optional host address filter
Optional shard ID filter
Number of shards on the host
Host address
DeepHealthCheck
Performs a deep health check of all subsystems.Overall health state (serving, not_serving)
Health status message
Additional Operations
ListQueues
Lists all queues in the system.Type of queue to list
Maximum queues per page
List of queues
AddTasks
Adds tasks to a queue.Target shard ID
Tasks to add
Authentication
The Admin Service requires proper authentication and authorization. Ensure your client has admin-level permissions to access these endpoints.Usage Notes
- Most Admin Service operations are low-level and should be used with caution in production
- Some operations like
DeleteWorkflowExecutionare destructive and cannot be undone - DLQ operations are critical for maintaining replication health
- Always test admin operations in a development environment first
- Monitor operation impact on cluster performance
Error Handling
Common error codes:NOT_FOUND- Requested resource does not existINVALID_ARGUMENT- Invalid parameters providedPERMISSION_DENIED- Insufficient permissionsINTERNAL- Internal server errorRESOURCE_EXHAUSTED- Rate limit exceeded