Skip to content
Merged
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
24 changes: 24 additions & 0 deletions gotocompany/shield/v1beta1/servicedata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ service ServiceDataService {
summary: "Get Group Service Data Key";
};
}

rpc GetServiceDataKeyDistinctValues(GetServiceDataKeyDistinctValuesRequest) returns (GetServiceDataKeyDistinctValuesResponse) {
option (google.api.http) = {
get: "/v1beta1/servicedata/distinct"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Service Data";
summary: "Get distinct service data values across all entities for a metadata path";
};
}
}

message ServiceDataKeyRequestBody {
Expand Down Expand Up @@ -135,3 +145,17 @@ message GetUserServiceDataResponse {
message GetGroupServiceDataResponse {
google.protobuf.Struct data = 1;
}

message GetServiceDataKeyDistinctValuesRequest {
// dot-separated metadata path: first segment is the service data key name,
// the rest addresses a location inside its value, e.g. "functional_roles.roles"
string path = 1 [(validate.rules).string.min_len = 1];
// entity namespace to aggregate over, "user" (default) or "group"
string namespace = 2 [(validate.rules).string = {in: "", in: "user", in: "group"}];
// project id or slug, required to identify the service data key
string project = 3 [(validate.rules).string.min_len = 1];
}

message GetServiceDataKeyDistinctValuesResponse {
repeated google.protobuf.Value values = 1;
}
Loading