diff --git a/backend/api/experiment.proto b/backend/api/experiment.proto index 841f90d27cb..ab5f8e4e9f3 100644 --- a/backend/api/experiment.proto +++ b/backend/api/experiment.proto @@ -58,6 +58,7 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { }; service ExperimentService { + //Create a new experiment. rpc CreateExperiment(CreateExperimentRequest) returns (Experiment) { option (google.api.http) = { post: "/apis/v1beta1/experiments" @@ -65,18 +66,21 @@ service ExperimentService { }; } + //Find a specific experiment by ID. rpc GetExperiment(GetExperimentRequest) returns (Experiment) { option (google.api.http) = { get: "/apis/v1beta1/experiments/{id}" }; } + //Find all experiments. rpc ListExperiment(ListExperimentsRequest) returns (ListExperimentsResponse) { option (google.api.http) = { get: "/apis/v1beta1/experiments" }; } + //Delete an experiment. rpc DeleteExperiment(DeleteExperimentRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/apis/v1beta1/experiments/{id}" @@ -85,12 +89,12 @@ service ExperimentService { } message CreateExperimentRequest { - // The experiment to be created + // The experiment to be created. Experiment experiment = 1; } message GetExperimentRequest { - // The ID of the experiment to be retrieved + // The ID of the experiment to be retrieved. string id = 1; } diff --git a/backend/api/job.proto b/backend/api/job.proto index c1dc076d593..5f52388856a 100644 --- a/backend/api/job.proto +++ b/backend/api/job.proto @@ -61,7 +61,9 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { } }; + service JobService { + //Create a new job. rpc CreateJob(CreateJobRequest) returns (Job) { option (google.api.http) = { post: "/apis/v1beta1/jobs" @@ -69,30 +71,35 @@ service JobService { }; } + //Find a specific job by ID. rpc GetJob(GetJobRequest) returns (Job) { option (google.api.http) = { get: "/apis/v1beta1/jobs/{id}" }; } + //Find all jobs. rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { option (google.api.http) = { get: "/apis/v1beta1/jobs" }; } + //Enable a job. rpc EnableJob(EnableJobRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/apis/v1beta1/jobs/{id}/enable" }; } + //Disable a job. rpc DisableJob(DisableJobRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/apis/v1beta1/jobs/{id}/disable" }; } + //Delete a job. rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/apis/v1beta1/jobs/{id}" @@ -114,7 +121,7 @@ message ListJobsRequest { string page_token = 1; int32 page_size = 2; - // Can be format of "field_name", "field_name asc" or "field_name des" + // Can be format of "field_name", "field_name asc" or "field_name des". // Ascending by default. string sort_by = 3; diff --git a/backend/api/pipeline.proto b/backend/api/pipeline.proto index d47385ee53c..c5a9eb33a30 100644 --- a/backend/api/pipeline.proto +++ b/backend/api/pipeline.proto @@ -61,6 +61,7 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { }; service PipelineService { + //Add a pipeline. rpc CreatePipeline(CreatePipelineRequest) returns (Pipeline) { option (google.api.http) = { post: "/apis/v1beta1/pipelines" @@ -68,24 +69,28 @@ service PipelineService { }; } + //Find a specific pipeline by ID. rpc GetPipeline(GetPipelineRequest) returns (Pipeline) { option (google.api.http) = { get: "/apis/v1beta1/pipelines/{id}" }; } + //Find all pipelines. rpc ListPipelines(ListPipelinesRequest) returns (ListPipelinesResponse) { option (google.api.http) = { get: "/apis/v1beta1/pipelines" }; } + //Delete a pipeline. rpc DeletePipeline(DeletePipelineRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/apis/v1beta1/pipelines/{id}" }; } + //Get a YAML template for the selected pipeline. rpc GetTemplate(GetTemplateRequest) returns (GetTemplateResponse) { option (google.api.http) = { get: "/apis/v1beta1/pipelines/{id}/templates" diff --git a/backend/api/run.proto b/backend/api/run.proto index 2f01172b5c2..986ab7f4176 100644 --- a/backend/api/run.proto +++ b/backend/api/run.proto @@ -59,9 +59,9 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { } }; -//Initiate a run. + service RunService { - // Creates a new run. + //Create a new run. rpc CreateRun(CreateRunRequest) returns (RunDetail) { option (google.api.http) = { post: "/apis/v1beta1/runs" @@ -69,35 +69,35 @@ service RunService { }; } - //Finds a specific run by ID. + //Find a specific run by ID. rpc GetRun(GetRunRequest) returns (RunDetail) { option (google.api.http) = { get: "/apis/v1beta1/runs/{run_id}" }; } - //Finds all runs. + //Find all runs. rpc ListRuns(ListRunsRequest) returns (ListRunsResponse) { option (google.api.http) = { get: "/apis/v1beta1/runs" }; } - //Archives a run. + //Archive a run. rpc ArchiveRun(ArchiveRunRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/apis/v1beta1/runs/{id}:archive" }; } - //Restores an archived run. + //Restore an archived run. rpc UnarchiveRun(UnarchiveRunRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/apis/v1beta1/runs/{id}:unarchive" }; } - //Deletes a run. + //Delete a run. rpc DeleteRun(DeleteRunRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/apis/v1beta1/runs/{id}" @@ -116,21 +116,21 @@ service RunService { }; } - //Finds a run's artifact data. + //Find a run's artifact data. rpc ReadArtifact(ReadArtifactRequest) returns (ReadArtifactResponse) { option (google.api.http) = { get: "/apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read" }; } - //Terminates an active run. + //Terminate an active run. rpc TerminateRun(TerminateRunRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/apis/v1beta1/runs/{run_id}/terminate" }; } - //Re-initiates a failed or terminated run. + //Re-initiate a failed or terminated run. rpc RetryRun(RetryRunRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/apis/v1beta1/runs/{run_id}/retry"