Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: get goal connection report API #1463

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions proto/experiment/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ message ListGoalsResponse {
int64 total_count = 3;
}

message GetGoalConnectionReportRequest {
string environment_id = 1 [(google.api.field_behavior) = REQUIRED];
}

message GetGoalConnectionReportResponse {
int64 current_month_total_experiments = 1;
int64 last_month_total_experiments = 2;

int64 current_month_total_operations = 3;
int64 last_month_total_operations = 4;

int64 current_month_not_in_use_goals = 5;
int64 last_month_not_in_use_goals = 6;
}

message CreateGoalRequest {
CreateGoalCommand command = 1 [
deprecated = true,
Expand Down Expand Up @@ -293,6 +308,40 @@ service ExperimentService {
}
};
}
rpc GetGoalConnectionReport(GetGoalConnectionReportRequest)
returns (GetGoalConnectionReportResponse) {
option (google.api.http) = {
get: "/v1/goal/connection-report"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Get connection report"
description: "This API returns a summary of the total number of experiments, auto operations, and not-in-use goals for the last and current months."
tags: "goal"
operation_id: "web.v1.goal.get_connection_report"
responses: {
key: "400"
value: {
description: "Returned for bad requests that may have failed validation."
schema: { json_schema: { ref: ".google.rpc.Status" } }
examples: {
key: "application/json"
value: '{ "code": 3, "message": "invalid arguments error", "details": [] }'
}
}
}
responses: {
key: "401"
value: {
description: "Request could not be authenticated (authentication required)."
schema: { json_schema: { ref: ".google.rpc.Status" } }
examples: {
key: "application/json"
value: '{ "code": 16, "message": "not authenticated", "details": [] }'
}
}
}
};
}
rpc CreateGoal(CreateGoalRequest) returns (CreateGoalResponse) {
option (google.api.http) = {
post: "/v1/goal"
Expand Down
Loading