@@ -21,7 +21,7 @@ import "frequenz/api/common/components.proto";
2121
2222service DispatchService {
2323 // Returns a list of all dispatches
24- rpc ListDispatches (DispatchFilter ) returns (DispatchList ) {
24+ rpc ListDispatches (DispatchListRequest ) returns (DispatchList ) {
2525 option (google.api.http ) = {
2626 get : "/v1/dispatches"
2727 };
@@ -116,31 +116,26 @@ message DispatchComponentIDs {
116116 repeated uint64 component_ids = 1 ;
117117}
118118
119- // Parameters for filtering the dispatch list
120- message DispatchFilter {
121- // Filter by dispatch ID
122- repeated uint64 ids = 1 ;
123-
124- // Filter by microgrid ID
125- repeated uint64 microgrid_ids = 2 ;
119+ // Message for listing dispatches for a given microgrid, and an optional filter
120+ message DispatchListRequest {
121+ // The microgrid ID
122+ uint64 microgrid_id = 1 ;
126123
127- // Filter by dispatch type
128- repeated string types = 3 ;
124+ // Additional filter parameters
125+ DispatchFilter filter = 2 ;
126+ }
129127
128+ // Parameters for filtering the dispatch list
129+ message DispatchFilter {
130130 // Filter by component ID or category
131- repeated DispatchComponentSelector selectors = 4 ;
131+ repeated DispatchComponentSelector selectors = 1 ;
132132
133133 // Filter by time interval
134- TimeIntervalFilter time_interval = 5 ;
135-
136- // Filter by "active" status
137- optional bool is_active = 6 ;
138-
139- // Filter by "dry run" status
140- optional bool is_dry_run = 7 ;
134+ // If no interval is provided, all dispatches starting from the
135+ // current timestamp will be included.
136+ TimeIntervalFilter time_interval = 2 ;
141137}
142138
143-
144139// A list of dispatches
145140message DispatchList {
146141 // The dispatches
0 commit comments