Skip to content

Commit

Permalink
StopRun and DeleteRun RPCs (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
solidiquis authored May 22, 2024
1 parent cbdc688 commit d2813e6
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions protos/sift/runs/v2/runs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,27 @@ service RunService {
};
}

// Permanently delete a given run. In order for a run to be deleted it must have a set `stop_time`.
rpc DeleteRun(DeleteRunRequest) returns (DeleteRunResponse) {
option (google.api.http) = {delete: "/api/v2/runs/{run_id}"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "DeleteRun"
description: "Permanently delete a given run. In order for a run to be deleted it must have a set `stop_time`."
};
}

// Set the stop time of a run to the current time. To set the stop time of a run to an arbitrary time see `UpdateRun`.
rpc StopRun(StopRunRequest) returns (StopRunResponse) {
option (google.api.http) = {
patch: "/api/v2/runs:stop"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "StopRun"
description: "Set the stop time of a run to the current time. To set the stop time of a run to an arbitrary time see `UpdateRun`."
};
}

// Associates a list of assets with a given run.
rpc CreateAutomaticRunAssociationForAssets(CreateAutomaticRunAssociationForAssetsRequest) returns (CreateAutomaticRunAssociationForAssetsResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -195,3 +216,19 @@ message CreateAutomaticRunAssociationForAssetsRequest {
}

message CreateAutomaticRunAssociationForAssetsResponse {}

// The request for a call to `RunService_DeleteRun`.
message DeleteRunRequest {
string run_id = 1 [(google.api.field_behavior) = REQUIRED];
}

// The response of a call to `RunService_DeleteRun`.
message DeleteRunResponse {}

// The request for a call to `RunService_StopRun` to stop a run.
message StopRunRequest {
string run_id = 1 [(google.api.field_behavior) = REQUIRED];
}

// The response of a call to `RunService_StopRun` to stop a run.
message StopRunResponse {}

0 comments on commit d2813e6

Please sign in to comment.