diff --git a/protos/backend_service.proto b/protos/backend_service.proto index ed96fa8..3426478 100644 --- a/protos/backend_service.proto +++ b/protos/backend_service.proto @@ -78,6 +78,9 @@ service BackendService { // Returns the current metrics for the backend service. rpc GetMetrics (GetMetricsRequest) returns (GetMetricsResponse); + + rpc ListInstanceIDs (ListInstanceIDsRequest) returns (ListInstanceIDsResponse); + rpc GetInstanceHistory (GetInstanceHistoryRequest) returns (GetInstanceHistoryResponse); } // Request payload for adding new orchestration events. diff --git a/protos/orchestrator_service.proto b/protos/orchestrator_service.proto index 41fad9d..1fa4f14 100644 --- a/protos/orchestrator_service.proto +++ b/protos/orchestrator_service.proto @@ -739,6 +739,9 @@ service TaskHubSidecarService { // Rerun a Workflow from a specific event ID of a workflow instance. rpc RerunWorkflowFromEvent(RerunWorkflowFromEventRequest) returns (RerunWorkflowFromEventResponse); + + rpc ListInstanceIDs (ListInstanceIDsRequest) returns (ListInstanceIDsResponse); + rpc GetInstanceHistory (GetInstanceHistoryRequest) returns (GetInstanceHistoryResponse); } message GetWorkItemsRequest { @@ -820,3 +823,36 @@ message RerunWorkflowFromEventRequest { message RerunWorkflowFromEventResponse { string newInstanceID = 1; } + +// ListInstanceIDsRequest is used to list all orchestration instances. +message ListInstanceIDsRequest { + // continuationToken is the continuation token to use for pagination. This + // is the token which the next page should start from. If not given, the + // first page will be returned. + optional string continuationToken = 1; + + // pageSize is the maximum number of instances to return for this page. If + // not given, all instances will be attempted to be returned. + optional uint32 pageSize = 2; +} + +// ListInstanceIDsResponse is the response to executing ListInstanceIDs. +message ListInstanceIDsResponse { + // instanceIds is the list of instance IDs returned. + repeated string instanceIds = 1; + + // continuationToken is the continuation token to use for pagination. If + // there are no more pages, this will be null. + optional string continuationToken = 2; +} + +// GetInstanceHistoryRequest is used to get the full history of an +// orchestration instance. +message GetInstanceHistoryRequest { + string instanceId = 1; +} + +// GetInstanceHistoryResponse is the response to executing GetInstanceHistory. +message GetInstanceHistoryResponse { + repeated HistoryEvent events = 1; +}