api/proto/banyandb/database/v1/rpc.proto (466 lines of code) (raw):

// Licensed to Apache Software Foundation (ASF) under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Apache Software Foundation (ASF) licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. syntax = "proto3"; package banyandb.database.v1; import "banyandb/common/v1/common.proto"; import "banyandb/database/v1/schema.proto"; import "google/api/annotations.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; option go_package = "github.com/apache/skywalking-banyandb/api/proto/banyandb/database/v1"; option java_package = "org.apache.skywalking.banyandb.database.v1"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {base_path: "/api"}; message StreamRegistryServiceCreateRequest { banyandb.database.v1.Stream stream = 1; } message StreamRegistryServiceCreateResponse { int64 mod_revision = 1; } message StreamRegistryServiceUpdateRequest { banyandb.database.v1.Stream stream = 1; } message StreamRegistryServiceUpdateResponse { int64 mod_revision = 1; } message StreamRegistryServiceDeleteRequest { banyandb.common.v1.Metadata metadata = 1; } message StreamRegistryServiceDeleteResponse { bool deleted = 1; } message StreamRegistryServiceGetRequest { banyandb.common.v1.Metadata metadata = 1; } message StreamRegistryServiceGetResponse { banyandb.database.v1.Stream stream = 1; } message StreamRegistryServiceExistRequest { banyandb.common.v1.Metadata metadata = 1; } message StreamRegistryServiceExistResponse { bool has_group = 1; bool has_stream = 2; } message StreamRegistryServiceListRequest { string group = 1; } message StreamRegistryServiceListResponse { repeated banyandb.database.v1.Stream stream = 1; } service StreamRegistryService { rpc Create(StreamRegistryServiceCreateRequest) returns (StreamRegistryServiceCreateResponse) { option (google.api.http) = { post: "/v1/stream/schema" body: "*" }; } rpc Update(StreamRegistryServiceUpdateRequest) returns (StreamRegistryServiceUpdateResponse) { option (google.api.http) = { put: "/v1/stream/schema/{stream.metadata.group}/{stream.metadata.name}" body: "*" }; } rpc Delete(StreamRegistryServiceDeleteRequest) returns (StreamRegistryServiceDeleteResponse) { option (google.api.http) = {delete: "/v1/stream/schema/{metadata.group}/{metadata.name}"}; } rpc Get(StreamRegistryServiceGetRequest) returns (StreamRegistryServiceGetResponse) { option (google.api.http) = {get: "/v1/stream/schema/{metadata.group}/{metadata.name}"}; } rpc List(StreamRegistryServiceListRequest) returns (StreamRegistryServiceListResponse) { option (google.api.http) = {get: "/v1/stream/schema/lists/{group}"}; } // Exist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead rpc Exist(StreamRegistryServiceExistRequest) returns (StreamRegistryServiceExistResponse); } message IndexRuleBindingRegistryServiceCreateRequest { banyandb.database.v1.IndexRuleBinding index_rule_binding = 1; } message IndexRuleBindingRegistryServiceCreateResponse {} message IndexRuleBindingRegistryServiceUpdateRequest { banyandb.database.v1.IndexRuleBinding index_rule_binding = 1; } message IndexRuleBindingRegistryServiceUpdateResponse {} message IndexRuleBindingRegistryServiceDeleteRequest { banyandb.common.v1.Metadata metadata = 1; } message IndexRuleBindingRegistryServiceDeleteResponse { bool deleted = 1; } message IndexRuleBindingRegistryServiceGetRequest { banyandb.common.v1.Metadata metadata = 1; } message IndexRuleBindingRegistryServiceGetResponse { banyandb.database.v1.IndexRuleBinding index_rule_binding = 1; } message IndexRuleBindingRegistryServiceListRequest { string group = 1; } message IndexRuleBindingRegistryServiceListResponse { repeated banyandb.database.v1.IndexRuleBinding index_rule_binding = 1; } message IndexRuleBindingRegistryServiceExistRequest { banyandb.common.v1.Metadata metadata = 1; } message IndexRuleBindingRegistryServiceExistResponse { bool has_group = 1; bool has_index_rule_binding = 2; } service IndexRuleBindingRegistryService { rpc Create(IndexRuleBindingRegistryServiceCreateRequest) returns (IndexRuleBindingRegistryServiceCreateResponse) { option (google.api.http) = { post: "/v1/index-rule-binding/schema" body: "*" }; } rpc Update(IndexRuleBindingRegistryServiceUpdateRequest) returns (IndexRuleBindingRegistryServiceUpdateResponse) { option (google.api.http) = { put: "/v1/index-rule-binding/schema/{index_rule_binding.metadata.group}/{index_rule_binding.metadata.name}" body: "*" }; } rpc Delete(IndexRuleBindingRegistryServiceDeleteRequest) returns (IndexRuleBindingRegistryServiceDeleteResponse) { option (google.api.http) = {delete: "/v1/index-rule-binding/schema/{metadata.group}/{metadata.name}"}; } rpc Get(IndexRuleBindingRegistryServiceGetRequest) returns (IndexRuleBindingRegistryServiceGetResponse) { option (google.api.http) = {get: "/v1/index-rule-binding/schema/{metadata.group}/{metadata.name}"}; } rpc List(IndexRuleBindingRegistryServiceListRequest) returns (IndexRuleBindingRegistryServiceListResponse) { option (google.api.http) = {get: "/v1/index-rule-binding/schema/lists/{group}"}; } // Exist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead rpc Exist(IndexRuleBindingRegistryServiceExistRequest) returns (IndexRuleBindingRegistryServiceExistResponse); } message IndexRuleRegistryServiceCreateRequest { banyandb.database.v1.IndexRule index_rule = 1; } message IndexRuleRegistryServiceCreateResponse {} message IndexRuleRegistryServiceUpdateRequest { banyandb.database.v1.IndexRule index_rule = 1; } message IndexRuleRegistryServiceUpdateResponse {} message IndexRuleRegistryServiceDeleteRequest { banyandb.common.v1.Metadata metadata = 1; } message IndexRuleRegistryServiceDeleteResponse { bool deleted = 1; } message IndexRuleRegistryServiceGetRequest { banyandb.common.v1.Metadata metadata = 1; } message IndexRuleRegistryServiceGetResponse { banyandb.database.v1.IndexRule index_rule = 1; } message IndexRuleRegistryServiceListRequest { string group = 1; } message IndexRuleRegistryServiceListResponse { repeated banyandb.database.v1.IndexRule index_rule = 1; } message IndexRuleRegistryServiceExistRequest { banyandb.common.v1.Metadata metadata = 1; } message IndexRuleRegistryServiceExistResponse { bool has_group = 1; bool has_index_rule = 2; } service IndexRuleRegistryService { rpc Create(IndexRuleRegistryServiceCreateRequest) returns (IndexRuleRegistryServiceCreateResponse) { option (google.api.http) = { post: "/v1/index-rule/schema" body: "*" }; } rpc Update(IndexRuleRegistryServiceUpdateRequest) returns (IndexRuleRegistryServiceUpdateResponse) { option (google.api.http) = { put: "/v1/index-rule/schema/{index_rule.metadata.group}/{index_rule.metadata.name}" body: "*" }; } rpc Delete(IndexRuleRegistryServiceDeleteRequest) returns (IndexRuleRegistryServiceDeleteResponse) { option (google.api.http) = {delete: "/v1/index-rule/schema/{metadata.group}/{metadata.name}"}; } rpc Get(IndexRuleRegistryServiceGetRequest) returns (IndexRuleRegistryServiceGetResponse) { option (google.api.http) = {get: "/v1/index-rule/schema/{metadata.group}/{metadata.name}"}; } rpc List(IndexRuleRegistryServiceListRequest) returns (IndexRuleRegistryServiceListResponse) { option (google.api.http) = {get: "/v1/index-rule/schema/lists/{group}"}; } // Exist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead rpc Exist(IndexRuleRegistryServiceExistRequest) returns (IndexRuleRegistryServiceExistResponse); } message MeasureRegistryServiceCreateRequest { banyandb.database.v1.Measure measure = 1; } message MeasureRegistryServiceCreateResponse { int64 mod_revision = 1; } message MeasureRegistryServiceUpdateRequest { banyandb.database.v1.Measure measure = 1; } message MeasureRegistryServiceUpdateResponse { int64 mod_revision = 1; } message MeasureRegistryServiceDeleteRequest { banyandb.common.v1.Metadata metadata = 1; } message MeasureRegistryServiceDeleteResponse { bool deleted = 1; } message MeasureRegistryServiceGetRequest { banyandb.common.v1.Metadata metadata = 1; } message MeasureRegistryServiceGetResponse { banyandb.database.v1.Measure measure = 1; } message MeasureRegistryServiceListRequest { string group = 1; } message MeasureRegistryServiceListResponse { repeated banyandb.database.v1.Measure measure = 1; } message MeasureRegistryServiceExistRequest { banyandb.common.v1.Metadata metadata = 1; } message MeasureRegistryServiceExistResponse { bool has_group = 1; bool has_measure = 2; } service MeasureRegistryService { rpc Create(MeasureRegistryServiceCreateRequest) returns (MeasureRegistryServiceCreateResponse) { option (google.api.http) = { post: "/v1/measure/schema" body: "*" }; } rpc Update(MeasureRegistryServiceUpdateRequest) returns (MeasureRegistryServiceUpdateResponse) { option (google.api.http) = { put: "/v1/measure/schema/{measure.metadata.group}/{measure.metadata.name}" body: "*" }; } rpc Delete(MeasureRegistryServiceDeleteRequest) returns (MeasureRegistryServiceDeleteResponse) { option (google.api.http) = {delete: "/v1/measure/schema/{metadata.group}/{metadata.name}"}; } rpc Get(MeasureRegistryServiceGetRequest) returns (MeasureRegistryServiceGetResponse) { option (google.api.http) = {get: "/v1/measure/schema/{metadata.group}/{metadata.name}"}; } rpc List(MeasureRegistryServiceListRequest) returns (MeasureRegistryServiceListResponse) { option (google.api.http) = {get: "/v1/measure/schema/lists/{group}"}; } // Exist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead rpc Exist(MeasureRegistryServiceExistRequest) returns (MeasureRegistryServiceExistResponse); } message GroupRegistryServiceCreateRequest { banyandb.common.v1.Group group = 1; } message GroupRegistryServiceCreateResponse {} message GroupRegistryServiceUpdateRequest { banyandb.common.v1.Group group = 1; } message GroupRegistryServiceUpdateResponse {} message GroupRegistryServiceDeleteRequest { string group = 1; } message GroupRegistryServiceDeleteResponse { bool deleted = 1; } message GroupRegistryServiceGetRequest { string group = 1; } message GroupRegistryServiceGetResponse { banyandb.common.v1.Group group = 1; } message GroupRegistryServiceListRequest {} message GroupRegistryServiceListResponse { repeated banyandb.common.v1.Group group = 1; } message GroupRegistryServiceExistRequest { string group = 1; } message GroupRegistryServiceExistResponse { bool has_group = 1; } service GroupRegistryService { rpc Create(GroupRegistryServiceCreateRequest) returns (GroupRegistryServiceCreateResponse) { option (google.api.http) = { post: "/v1/group/schema" body: "*" }; } rpc Update(GroupRegistryServiceUpdateRequest) returns (GroupRegistryServiceUpdateResponse) { option (google.api.http) = { put: "/v1/group/schema/{group.metadata.name}" body: "*" }; } rpc Delete(GroupRegistryServiceDeleteRequest) returns (GroupRegistryServiceDeleteResponse) { option (google.api.http) = {delete: "/v1/group/schema/{group}"}; } rpc Get(GroupRegistryServiceGetRequest) returns (GroupRegistryServiceGetResponse) { option (google.api.http) = {get: "/v1/group/schema/{group}"}; } rpc List(GroupRegistryServiceListRequest) returns (GroupRegistryServiceListResponse) { option (google.api.http) = {get: "/v1/group/schema/lists"}; } // Exist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead rpc Exist(GroupRegistryServiceExistRequest) returns (GroupRegistryServiceExistResponse); } message TopNAggregationRegistryServiceCreateRequest { banyandb.database.v1.TopNAggregation top_n_aggregation = 1; } message TopNAggregationRegistryServiceCreateResponse {} message TopNAggregationRegistryServiceUpdateRequest { banyandb.database.v1.TopNAggregation top_n_aggregation = 1; } message TopNAggregationRegistryServiceUpdateResponse {} message TopNAggregationRegistryServiceDeleteRequest { banyandb.common.v1.Metadata metadata = 1; } message TopNAggregationRegistryServiceDeleteResponse { bool deleted = 1; } message TopNAggregationRegistryServiceGetRequest { banyandb.common.v1.Metadata metadata = 1; } message TopNAggregationRegistryServiceGetResponse { banyandb.database.v1.TopNAggregation top_n_aggregation = 1; } message TopNAggregationRegistryServiceListRequest { string group = 1; } message TopNAggregationRegistryServiceListResponse { repeated banyandb.database.v1.TopNAggregation top_n_aggregation = 1; } message TopNAggregationRegistryServiceExistRequest { banyandb.common.v1.Metadata metadata = 1; } message TopNAggregationRegistryServiceExistResponse { bool has_group = 1; bool has_top_n_aggregation = 2; } service TopNAggregationRegistryService { rpc Create(TopNAggregationRegistryServiceCreateRequest) returns (TopNAggregationRegistryServiceCreateResponse) { option (google.api.http) = { post: "/v1/topn-agg/schema" body: "*" }; } rpc Update(TopNAggregationRegistryServiceUpdateRequest) returns (TopNAggregationRegistryServiceUpdateResponse) { option (google.api.http) = { put: "/v1/topn-agg/schema/{top_n_aggregation.metadata.group}/{top_n_aggregation.metadata.name}" body: "*" }; } rpc Delete(TopNAggregationRegistryServiceDeleteRequest) returns (TopNAggregationRegistryServiceDeleteResponse) { option (google.api.http) = {delete: "/v1/topn-agg/schema/{metadata.group}/{metadata.name}"}; } rpc Get(TopNAggregationRegistryServiceGetRequest) returns (TopNAggregationRegistryServiceGetResponse) { option (google.api.http) = {get: "/v1/topn-agg/schema/{metadata.group}/{metadata.name}"}; } rpc List(TopNAggregationRegistryServiceListRequest) returns (TopNAggregationRegistryServiceListResponse) { option (google.api.http) = {get: "/v1/topn-agg/schema/lists/{group}"}; } // Exist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead rpc Exist(TopNAggregationRegistryServiceExistRequest) returns (TopNAggregationRegistryServiceExistResponse); } message SnapshotRequest { message Group { common.v1.Catalog catalog = 1; string group = 2; } repeated Group groups = 1; } message Snapshot { common.v1.Catalog catalog = 1; string name = 2; string error = 3; } message SnapshotResponse { repeated Snapshot snapshots = 1; } service SnapshotService { rpc Snapshot(SnapshotRequest) returns (SnapshotResponse) { option (google.api.http) = { get: "/v1/snapshot" additional_bindings: { post: "/v1/snapshot" body: "*" } }; } } message PropertyRegistryServiceCreateRequest { banyandb.database.v1.Property property = 1; } message PropertyRegistryServiceCreateResponse { int64 mod_revision = 1; } message PropertyRegistryServiceUpdateRequest { banyandb.database.v1.Property property = 1; } message PropertyRegistryServiceUpdateResponse { int64 mod_revision = 1; } message PropertyRegistryServiceDeleteRequest { banyandb.common.v1.Metadata metadata = 1; } message PropertyRegistryServiceDeleteResponse { bool deleted = 1; } message PropertyRegistryServiceGetRequest { banyandb.common.v1.Metadata metadata = 1; } message PropertyRegistryServiceGetResponse { banyandb.database.v1.Property property = 1; } message PropertyRegistryServiceListRequest { string group = 1; } message PropertyRegistryServiceListResponse { repeated banyandb.database.v1.Property properties = 1; } message PropertyRegistryServiceExistRequest { banyandb.common.v1.Metadata metadata = 1; } message PropertyRegistryServiceExistResponse { bool has_group = 1; bool has_property = 2; } service PropertyRegistryService { rpc Create(PropertyRegistryServiceCreateRequest) returns (PropertyRegistryServiceCreateResponse) { option (google.api.http) = { post: "/v1/property/schema" body: "*" }; } rpc Update(PropertyRegistryServiceUpdateRequest) returns (PropertyRegistryServiceUpdateResponse) { option (google.api.http) = { put: "/v1/property/schema/{property.metadata.group}/{property.metadata.name}" body: "*" }; } rpc Delete(PropertyRegistryServiceDeleteRequest) returns (PropertyRegistryServiceDeleteResponse) { option (google.api.http) = {delete: "/v1/property/schema/{metadata.group}/{metadata.name}"}; } rpc Get(PropertyRegistryServiceGetRequest) returns (PropertyRegistryServiceGetResponse) { option (google.api.http) = {get: "/v1/property/schema/{metadata.group}/{metadata.name}"}; } rpc List(PropertyRegistryServiceListRequest) returns (PropertyRegistryServiceListResponse) { option (google.api.http) = {get: "/v1/property/schema/lists/{group}"}; } // Exist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead rpc Exist(PropertyRegistryServiceExistRequest) returns (PropertyRegistryServiceExistResponse); }