Skip to content

Commit

Permalink
Updating API descriptions (#76)
Browse files Browse the repository at this point in the history
* chore: Update protofetch.toml

* fix: common was broken

---------

Co-authored-by: Github Actions <github@coralogix.com>
  • Loading branch information
celaus and Github Actions authored Oct 28, 2024
1 parent 110d154 commit c50f539
Show file tree
Hide file tree
Showing 19 changed files with 1,757 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ message FinalLocation {
LocationSpec spec = 1;
// In case of data saved to S3 - base prefix of the dataset inside the bucket, without the dynamic dt/hr part
optional string final_location_base_prefix = 2;
// Represents a relation between datasets and its physical location. created by datasets-tracker service
string id = 3;
}

// Intended for internal use inside ingestion pipeline. Only part that may change after dataset-ingress.
Expand Down
1 change: 1 addition & 0 deletions proto/com/coralogix/archive/v2/target_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ message SetExternalTargetRequest {
S3TargetSpec s3 = 2;
IBMCosTargetSpec ibm_cos = 3;
}
uint32 company_id = 4;
}

message SetExternalTargetResponse {
Expand Down
2 changes: 2 additions & 0 deletions proto/com/coralogix/common/v1/audit_log.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import "google/protobuf/descriptor.proto";

package com.coralogix.common.v1;

option go_package = "com/coralogix/common/v1";

message AuditLogDescription {
string description = 1;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
syntax = "proto3";

package com.coralogix.dataprime.background_queries.v1;

import "com/coralogix/dataprime/v1/compile.proto";
import "com/coralogix/dataprime/v1/query.proto";
import "com/coralogix/dataprime/v1/warnings.proto";

import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";

message RunQueryRequest {
google.protobuf.StringValue name = 1;
optional google.protobuf.StringValue description = 2;
com.coralogix.dataprime.v1.QuerySyntax syntax = 3;
com.coralogix.dataprime.v1.QueryPayload query = 4;
google.protobuf.StringValue raw_query = 5;
google.protobuf.Timestamp from_date = 6;
google.protobuf.Timestamp to_date = 7;
repeated google.protobuf.StringValue application_filters = 8;
repeated google.protobuf.StringValue severity_filters = 9;
repeated google.protobuf.StringValue subsystem_filters = 10;
optional google.protobuf.StringValue widget_id = 11;
optional google.protobuf.StringValue request_params_hash = 12;
optional OutputSchema tsv_output_schema = 13;
// contextual `now` for the query, default: current time
optional google.protobuf.Timestamp now_date = 14;
}

message BackgroundQueryResult {
google.protobuf.StringValue result = 1;
}

message OutputSchema {
// empty means default fields
repeated OutputSchemaField fields = 1;
}

message OutputSchemaField {
repeated google.protobuf.StringValue path = 1;
}

message RunQueryResponse {
BackgroundQuery background_query = 1;
}

message ListQueriesRequest {
reserved 4; // formerly request_params_hash
int32 page = 1;
int32 size = 2;
google.protobuf.StringValue filter = 3;
Ordering ordering = 5;
reserved 6;

enum Ordering {
ORDERING_DESC_UNSPECIFIED = 0;
ORDERING_ASC = 1;
}
}

message ListQueriesResponse {
reserved 3; // formerly request_params_hash
repeated BackgroundQuery background_queries = 1;
int32 total_count = 2;
}

message ListQueryNamesRequest {
int32 limit = 1;
optional google.protobuf.StringValue contains_filter = 2;
}

message ListQueryNamesResponse {
repeated QueryName query_names = 1;
}

message QueryName {
google.protobuf.StringValue query_name = 1;
}

message QueryResultRequest {
google.protobuf.StringValue archive_query_id = 1;
optional com.coralogix.dataprime.v1.QueryPayload query = 2;
optional int32 page = 3;
optional int32 size = 4;
optional Format format = 5;

enum Format {
FORMAT_JSON_UNSPECIFIED = 0;
FORMAT_CSV = 1;
}
}

message QueryResultResponse {
BackgroundQueryResult result = 1;
}

message GetQueryRequest {
string id = 1;
}

message GetQueryResponse {
optional BackgroundQuery background_query = 1;
}

message BackgroundQuery {
enum Status {
STATUS_PENDING_UNSPECIFIED = 0;
STATUS_IN_PROGRESS = 1;
STATUS_COMPLETED = 2;
STATUS_FAILED = 3;
}

google.protobuf.StringValue id = 1;
google.protobuf.StringValue name = 2;
optional google.protobuf.StringValue description = 3;
com.coralogix.dataprime.v1.QuerySyntax syntax = 4;
google.protobuf.StringValue query = 5;
google.protobuf.Timestamp from_date = 6;
google.protobuf.Timestamp to_date = 7;
repeated google.protobuf.StringValue application_filters = 8;
repeated google.protobuf.StringValue severity_filters = 9;
repeated google.protobuf.StringValue subsystem_filters = 10;
Status status = 11;
google.protobuf.StringValue created_by = 12;
optional google.protobuf.Timestamp started_at = 13;
optional google.protobuf.Timestamp completed_at = 14;
optional google.protobuf.Timestamp expires_at = 15;
optional google.protobuf.StringValue status_failed_description = 16;
int64 rows_total_count = 17;
optional google.protobuf.StringValue widget_id = 18;
bool scan_limit_reached = 19;
bool blocks_limit_reached = 20;
com.coralogix.dataprime.v1.ArchiveWarning archive_warning = 21;
optional OutputSchema tsv_output_schema = 22;
bool shuffle_file_size_limit_reached = 23;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
syntax = "proto3";

package com.coralogix.dataprime.background_queries.v1;

import "com/coralogix/dataprime/v1/audit_log.proto";
import "com/coralogix/dataprime/background_queries/v1/background_query.proto";

import "google/api/annotations.proto";
import "google/protobuf/descriptor.proto";

service BackgroundQueryService {
rpc RunQuery(RunQueryRequest) returns (RunQueryResponse) {
option (com.coralogix.dataprime.v1.audit_log_description).description = "Run background query";
option (google.api.http) = {post: "/api/v1/query/background/run"};
}

rpc ListQueries(ListQueriesRequest) returns (ListQueriesResponse) {
option (com.coralogix.dataprime.v1.audit_log_description).description = "List background queries";
option (google.api.http) = {get: "/api/v1/query/background/list"};
}

rpc ListQueryNames(ListQueryNamesRequest) returns (ListQueryNamesResponse) {
option (com.coralogix.dataprime.v1.audit_log_description).description = "List background query names";
option (google.api.http) = {get: "/api/v1/query/background/list/names"};
}

rpc GetQuery(GetQueryRequest) returns (GetQueryResponse) {
option (com.coralogix.dataprime.v1.audit_log_description).description = "Get query by id";
option (google.api.http) = {get: "/api/v1/query/background"};
}

rpc QueryResult(QueryResultRequest) returns (stream QueryResultResponse) {
option (com.coralogix.dataprime.v1.audit_log_description).description = "Query result";
option (google.api.http) = {get: "/api/v1/query/background/result"};
}
}
15 changes: 7 additions & 8 deletions proto/com/coralogix/dataprime/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ message PhysicalLocation {
PARTITIONING_DT_HR = 2;
}

enum Format {
FORMAT_UNSPECIFIED = 0;
FORMAT_CSV = 1;
FORMAT_WIDE_PARQUET_V1 = 2;
FORMAT_WIDE_PARQUET_V3 = 3;
}

enum BucketType {
BUCKET_TYPE_UNSPECIFIED = 0;
BUCKET_TYPE_EXTERNAL = 1;
Expand All @@ -139,7 +132,7 @@ message PhysicalLocation {
}

message ObjectStoreLocation {
Format format = 1;
reserved 1; // formerly format
oneof location {
S3Location s3 = 2;
COSLocation cos = 3;
Expand All @@ -158,12 +151,18 @@ message PhysicalLocation {

message SchemaStoreLocation {
repeated string team_ids = 1;
string name = 2;
}

message CsvLocation {
ObjectStoreLocation location = 1;
}

oneof location {
ArchiveLocation archive = 1;
OpenSearchLocation open_search = 2;
SchemaStoreLocation schema_store = 3;
CsvLocation csv = 4;
}
}

Expand Down
3 changes: 3 additions & 0 deletions proto/com/coralogix/dataprime/v1/run_request.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ message RequestComponent {
Component.ComparedHistogram compared_histogram = 10;
Component.SidebarFiltersCounts sidebar_filters_count = 11;
Component.TeamIdCounts team_id_counts = 12;
Component.MappingExceptionsCount mapping_exceptions_count = 13;
}
}

Expand Down Expand Up @@ -84,6 +85,8 @@ message Component {
}

message TeamIdCounts {}

message MappingExceptionsCount {}
}

message Filter {
Expand Down
5 changes: 5 additions & 0 deletions proto/com/coralogix/dataprime/v1/run_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ message RunDataprimeQueryResponse {
SideBarFilters sidebar_filters = 11;
RequestStatistics request_statistics = 12;
TeamIdCounts team_id_counts = 13;
MappingExceptionsCount mapping_exceptions_count = 14;
}
}

Expand Down Expand Up @@ -108,6 +109,10 @@ message TeamIdCount {
google.protobuf.Int64Value count = 2;
}

message MappingExceptionsCount {
google.protobuf.Int64Value count = 1;
}

// ------- Response entities
message LogEntry {
google.protobuf.Int64Value index = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ enum Permission {
PERMISSION_METRICS_DATA_SETUP_LOW_UPDATE_CONFIG = 64 [(expression) = "metrics.data-setup#low:UpdateConfig", (action) = ACTION_UPDATECONFIG, (resource) = RESOURCE_METRICS_DATA_SETUP_LOW, (permission_group) = PERMISSION_GROUP_METRICS, (description) = "Manage Archive Bucket Settings (Metrics)", (doc_link) = "https://coralogix.com/docs/archive-retention-policy/#set-archive-retention-settings", (explanation) = "Manage archive bucket settings.", (is_team_level) = true];
PERMISSION_METRICS_RECORDING_RULES_READ_CONFIG = 65 [(expression) = "metrics.recording-rules:ReadConfig", (action) = ACTION_READ_CONFIG, (resource) = RESOURCE_METRICS_RECORDING_RULES, (permission_group) = PERMISSION_GROUP_RECORDING_RULES, (description) = "View Recording Rules", (doc_link) = "https://coralogix.com/docs/recordingrules/", (explanation) = "View recording rules.", (is_team_level) = true];
PERMISSION_METRICS_RECORDING_RULES_UPDATE_CONFIG = 66 [(expression) = "metrics.recording-rules:UpdateConfig", (action) = ACTION_UPDATECONFIG, (resource) = RESOURCE_METRICS_RECORDING_RULES, (permission_group) = PERMISSION_GROUP_RECORDING_RULES, (description) = "Manage Recording Rules", (doc_link) = "https://coralogix.com/docs/recordingrules/", (explanation) = "Create, modify, or import recording rules.", (is_team_level) = true];
PERMISSION_METRICS_TCO_READ_POLICIES = 67 [(expression) = "metrics.tco:ReadPolicies", (action) = ACTION_READPOLICIES, (resource) = RESOURCE_METRICS_TCO, (permission_group) = PERMISSION_GROUP_DATAPLANS, (description) = "View Metrics TCO Policies", (doc_link) = "", (explanation) = "View metrics TCO policies.", (hidden) = true, (is_team_level) = true];
PERMISSION_METRICS_TCO_UPDATE_POLICIES = 68 [(expression) = "metrics.tco:UpdatePolicies", (action) = ACTION_UPDATEPOLICIES, (resource) = RESOURCE_METRICS_TCO, (permission_group) = PERMISSION_GROUP_DATAPLANS, (description) = "Manage Metrics TCO Policies", (doc_link) = "", (explanation) = "Manage metrics TCO policies.", (hidden) = true, (is_team_level) = true];
PERMISSION_METRICS_TCO_READ_POLICIES = 67 [(expression) = "metrics.tco:ReadPolicies", (action) = ACTION_READPOLICIES, (resource) = RESOURCE_METRICS_TCO, (permission_group) = PERMISSION_GROUP_DATAPLANS, (description) = "View Metrics TCO Policies", (doc_link) = "", (explanation) = "View metrics TCO policies.", (is_team_level) = true];
PERMISSION_METRICS_TCO_UPDATE_POLICIES = 68 [(expression) = "metrics.tco:UpdatePolicies", (action) = ACTION_UPDATEPOLICIES, (resource) = RESOURCE_METRICS_TCO, (permission_group) = PERMISSION_GROUP_DATAPLANS, (description) = "Manage Metrics TCO Policies", (doc_link) = "", (explanation) = "Manage metrics TCO policies.", (is_team_level) = true];
PERMISSION_OPENSEARCH_DASHBOARDS_READ = 69 [(expression) = "opensearch-dashboards:Read", (action) = ACTION_READ, (resource) = RESOURCE_OPENSEARCH_DASHBOARDS, (permission_group) = PERMISSION_GROUP_HOSTED_APPS, (description) = "View OpenSearch Dashboards", (doc_link) = "https://coralogix.com/docs/hosted-opensearch-view/", (explanation) = "View OpenSearch dashboards.", (is_team_level) = true];
PERMISSION_OPENSEARCH_DASHBOARDS_UPDATE = 70 [(expression) = "opensearch-dashboards:Update", (action) = ACTION_UPDATE, (resource) = RESOURCE_OPENSEARCH_DASHBOARDS, (permission_group) = PERMISSION_GROUP_HOSTED_APPS, (description) = "Manage OpenSearch Dashboards", (doc_link) = "https://coralogix.com/docs/hosted-opensearch-view/", (explanation) = "Create, modify, and remove OpenSearch dashboards.", (is_team_level) = true];
PERMISSION_ORG_ADMINS_MANAGE = 71 [(expression) = "org-admins:Manage", (action) = ACTION_MANAGE, (resource) = RESOURCE_ORG_ADMINS, (permission_group) = PERMISSION_GROUP_AAA, (description) = "Manage Org Admins", (doc_link) = "https://coralogix.com/docs/managing-your-organization-manage-admins/", (explanation) = "View, add, and remove organization administrators belonging your organization.", (is_org_level) = true];
Expand Down Expand Up @@ -285,5 +285,10 @@ enum Permission {
PERMISSION_TEAM_ALERTS_SETTINGS_READ_CONFIG = 227 [(expression) = "team-alerts-settings:ReadConfig", (action) = ACTION_READ_CONFIG, (resource) = RESOURCE_TEAM_ALERTS_SETTINGS, (permission_group) = PERMISSION_GROUP_ALERTS, (description) = "Read cx_alerts toggle in Team settings", (doc_link) = "https://coralogix.com/docs/alert-aggregation/", (explanation) = "Being able to view the toggle in the settings.", (is_team_level) = true];
PERMISSION_TEAM_AI_SETTINGS_MANAGE = 228 [(expression) = "team-ai-settings:Manage", (action) = ACTION_MANAGE, (resource) = RESOURCE_TEAM_AI_SETTINGS, (permission_group) = PERMISSION_GROUP_ADMINISTRATION, (description) = "Manage AI team settings.", (doc_link) = "", (explanation) = "Allow users to manage the AI team settings and the individual toggle state for each AI feature via Settings > Preferences.", (is_team_level) = true];
PERMISSION_TEAM_AI_SETTINGS_READ_CONFIG = 229 [(expression) = "team-ai-settings:ReadConfig", (action) = ACTION_READ_CONFIG, (resource) = RESOURCE_TEAM_AI_SETTINGS, (permission_group) = PERMISSION_GROUP_ADMINISTRATION, (description) = "View AI team settings.", (doc_link) = "", (explanation) = "Allow users to view the AI team settings and the individual toggle state for each AI feature via Settings > Preferences.", (is_team_level) = true];
PERMISSION_NOTIFICATION_CENTER_CONNECTORS_READ_CONFIG = 230 [(expression) = "notification-center-connectors:ReadConfig", (action) = ACTION_READ_CONFIG, (resource) = RESOURCE_NOTIFICATION_CENTER_CONNECTORS, (permission_group) = PERMISSION_GROUP_NOTIFICATIONS, (description) = "Read Notification Center connectors data", (doc_link) = "", (explanation) = "View the existing connectors in the notification center and their field data", (hidden) = true, (is_team_level) = true];
PERMISSION_NOTIFICATION_CENTER_CONNECTORS_READ_SUMMARY = 231 [(expression) = "notification-center-connectors:ReadSummary", (action) = ACTION_READ_SUMMARY, (resource) = RESOURCE_NOTIFICATION_CENTER_CONNECTORS, (permission_group) = PERMISSION_GROUP_NOTIFICATIONS, (description) = "View Notification Center connectors list", (doc_link) = "", (explanation) = "View the list of existing connectors in the notification center", (hidden) = true, (is_team_level) = true];
PERMISSION_NOTIFICATION_CENTER_CONNECTORS_UPDATE_CONFIG = 232 [(expression) = "notification-center-connectors:UpdateConfig", (action) = ACTION_UPDATECONFIG, (resource) = RESOURCE_NOTIFICATION_CENTER_CONNECTORS, (permission_group) = PERMISSION_GROUP_NOTIFICATIONS, (description) = "Edit Notification Center connectors", (doc_link) = "", (explanation) = "Create and edit connectors in the notification center and their field data", (hidden) = true, (is_team_level) = true];
PERMISSION_NOTIFICATION_CENTER_PRESETS_READ_CONFIG = 233 [(expression) = "notification-center-presets:ReadConfig", (action) = ACTION_READ_CONFIG, (resource) = RESOURCE_NOTIFICATION_CENTER_PRESETS, (permission_group) = PERMISSION_GROUP_NOTIFICATIONS, (description) = "Read Notification Center presets data", (doc_link) = "", (explanation) = "View the existing presets in the notification center and their field templates", (hidden) = true, (is_team_level) = true];
PERMISSION_NOTIFICATION_CENTER_PRESETS_READ_SUMMARY = 234 [(expression) = "notification-center-presets:ReadSummary", (action) = ACTION_READ_SUMMARY, (resource) = RESOURCE_NOTIFICATION_CENTER_PRESETS, (permission_group) = PERMISSION_GROUP_NOTIFICATIONS, (description) = "View Notification Center presets list", (doc_link) = "", (explanation) = "View the list of existing presets in the notification center", (hidden) = true, (is_team_level) = true];
PERMISSION_NOTIFICATION_CENTER_PRESETS_UPDATE_CONFIG = 235 [(expression) = "notification-center-presets:UpdateConfig", (action) = ACTION_UPDATECONFIG, (resource) = RESOURCE_NOTIFICATION_CENTER_PRESETS, (permission_group) = PERMISSION_GROUP_NOTIFICATIONS, (description) = "Edit Notification Center presets", (doc_link) = "", (explanation) = "Create and edit presets in the notification center and their field templates", (hidden) = true, (is_team_level) = true];
}

2 changes: 2 additions & 0 deletions proto/com/coralogix/permissions/v1/actions_resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ enum Resource {
RESOURCE_RESOURCE_CATALOG = 125 [(name) = "resource-catalog"];
RESOURCE_TEAM_ALERTS_SETTINGS = 126 [(name) = "team-alerts-settings"];
RESOURCE_TEAM_AI_SETTINGS = 127 [(name) = "team-ai-settings"];
RESOURCE_NOTIFICATION_CENTER_CONNECTORS = 128 [(name) = "notification-center-connectors"];
RESOURCE_NOTIFICATION_CENTER_PRESETS = 129 [(name) = "notification-center-presets"];
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package com.coralogixapis.dashboards.v1.ast.widgets;
import "com/coralogixapis/dashboards/v1/ast/filter.proto";
import "com/coralogixapis/dashboards/v1/ast/widgets/common/colors_by.proto";
import "com/coralogixapis/dashboards/v1/ast/widgets/common/data_mode_type.proto";
import "com/coralogixapis/dashboards/v1/ast/widgets/common/legend.proto";
import "com/coralogixapis/dashboards/v1/ast/widgets/common/metrics_query_editor_mode.proto";
import "com/coralogixapis/dashboards/v1/ast/widgets/common/queries.proto";
import "com/coralogixapis/dashboards/v1/ast/widgets/common/scale.proto";
Expand Down Expand Up @@ -34,6 +35,7 @@ message BarChart {
BarValueDisplay bar_value_display = 12;
google.protobuf.StringValue custom_unit = 13;
google.protobuf.Int32Value decimal = 14;
common.Legend Legend = 15;

message Query {
oneof value {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ message CreateDashboardRequest {
ast.Dashboard dashboard = 2;
}

message CreateDashboardResponse {}
message CreateDashboardResponse {
google.protobuf.StringValue dashboard_id = 1;
}

message ReplaceDashboardRequest {
google.protobuf.StringValue request_id = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/com/coralogixapis/views/v1/time_selection.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ message TimeSelection {
}

message QuickTimeSelection {
google.protobuf.StringValue caption = 2;
google.protobuf.StringValue caption = 2 [deprecated = true];
uint32 seconds = 3;
}

Expand Down
44 changes: 44 additions & 0 deletions proto/protoc-gen-openapiv2/annotations.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
syntax = "proto3";

package grpc.gateway.protoc_gen_openapiv2.options;

import "google/protobuf/descriptor.proto";
import "protoc-gen-openapiv2/options/openapiv2.proto";

option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options";

extend google.protobuf.FileOptions {
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
Swagger openapiv2_swagger = 1042;
}
extend google.protobuf.MethodOptions {
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
Operation openapiv2_operation = 1042;
}
extend google.protobuf.MessageOptions {
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
Schema openapiv2_schema = 1042;
}
extend google.protobuf.ServiceOptions {
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
Tag openapiv2_tag = 1042;
}
extend google.protobuf.FieldOptions {
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
JSONSchema openapiv2_field = 1042;
}
Loading

0 comments on commit c50f539

Please sign in to comment.