blob: d78074ae65901502d93da754d16a003d07521266 [file] [log] [blame] [edit]
syntax = "proto3";
package testgrid.api.v1;
option go_package = "github.com/GoogleCloudPlatform/testgrid/pb/api/v1";
import "google/protobuf/timestamp.proto";
import "pb/config/config.proto";
import "pb/state/state.proto";
service TestGridData {
// GET /dashboards
// Lists dashboard names
rpc ListDashboard(ListDashboardRequest) returns (ListDashboardResponse) {}
// GET /dashboard-groups
// Lists the dashboard group names
rpc ListDashboardGroup(ListDashboardGroupRequest)
returns (ListDashboardGroupResponse) {}
// GET /dashboards/{dashboard}/tabs
// Lists the dashboard tab names
rpc ListDashboardTabs(ListDashboardTabsRequest)
returns (ListDashboardTabsResponse) {}
// GET /dashboards/{dashboard}
// Returns a Dashboard config's metadata
// Excludes subtabs, accessed through the /tabs list method instead
rpc GetDashboard(GetDashboardRequest) returns (GetDashboardResponse) {}
// GET /dashboard-groups/{dashboard-group}
// Lists the dashboard names in that group
rpc GetDashboardGroup(GetDashboardGroupRequest)
returns (GetDashboardGroupResponse) {}
// GET /dashboards/{dashboard}/tabs/{tab}
// Returns a tab’s configuration, as stored
// rpc GetDashboardTab(GetDashboardTabRequest) returns
// (GetDashboardTabResponse) {}
// GET /summary/{dashboard}
// GET /dashboards/{dashboard}/summary
// Returns a summary of this dashboard, as stored
// rpc GetSummary(GetSummaryRequest) returns (GetSummaryResponse) {}
// GET /dashboards/{dashboard}/tabs/{tab}/headers
// Returns the headers for grid results
rpc ListHeaders(ListHeadersRequest) returns (ListHeadersResponse) {}
// GET /dashboards/{dashboard}/tabs/{tab}/rows
// Returns information on grid rows, and data within those rows
rpc ListRows(ListRowsRequest) returns (ListRowsResponse) {}
}
message ListDashboardRequest { string scope = 1; }
message ListDashboardResponse { repeated Resource dashboards = 1; }
message ListDashboardGroupRequest { string scope = 1; }
message ListDashboardGroupResponse { repeated Resource dashboard_groups = 1; }
message ListDashboardTabsRequest {
string scope = 1;
string dashboard = 2;
}
message ListDashboardTabsResponse { repeated Resource dashboard_tabs = 1; }
message GetDashboardRequest {
string scope = 1;
string dashboard = 2;
}
message GetDashboardResponse {
// A list of notifications attached to this dashboard.
// This is displayed on any dashboard tab in this dashboard.
repeated Notification notifications = 1;
// Control which tab is displayed when first opening a dashboard.
// Defaults to Summary
string default_tab = 2;
// Controls whether to suppress highlighting of failing tabs.
bool suppress_failing_tabs = 3;
// Controls whether to apply special highlighting to result header columns for
// the current day.
bool highlight_today = 4;
}
message GetDashboardGroupRequest {
string scope = 1;
string dashboard_group = 2;
}
message GetDashboardGroupResponse { repeated Resource dashboards = 1; }
message ListHeadersRequest {
string scope = 1;
string dashboard = 2;
string tab = 3;
}
message ListHeadersResponse {
repeated Header headers = 1;
message Header {
// Unique instance of the job, typically BUILD_NUMBER from prow or a guid
string build = 1;
// Name associated with the column (such as the run/invocation ID). No two
// columns should have the same build_id and name. The name field allows the
// display of multiple columns with the same build_id.
string name = 2;
// When the build started running
google.protobuf.Timestamp started = 3;
// Additional custom headers like commit, image used, etc.
repeated string extra = 4;
// Custom hotlist ids.
string hotlist_ids = 5;
}
}
message ListRowsRequest {
string scope = 1;
string dashboard = 2;
string tab = 3;
}
message ListRowsResponse {
repeated Row rows = 1;
message Row {
// Display name of the test case
string name = 1;
// Historical results of the test case. Unencoded.
repeated Cell cells = 2;
// Issue or Bug IDs associated with the test case
repeated string issues = 3;
// Alert associated with the test case
AlertInfo alert = 4;
// TODO(chases2): Add metrics to these resources
}
message Cell {
int32 result = 1;
string cell_id = 2;
string message = 3;
string icon = 4;
}
}
// A Resource is a REST resource, often returned by a LIST command
// It includes the name of the resource and a link to the resource
message Resource {
string name = 1;
string link = 2;
}