Protocol Documentation

Table of Contents

banyandb/cluster/v1/rpc.proto

SendRequest

FieldTypeLabelDescription
topicstring
message_iduint64
bodygoogle.protobuf.Any
batch_modbool

SendResponse

FieldTypeLabelDescription
message_iduint64
errorstring
bodygoogle.protobuf.Any

Service

Method NameRequest TypeResponse TypeDescription
SendSendRequest streamSendResponse stream

banyandb/common/v1/common.proto

Group

Group is an internal object for Group management

FieldTypeLabelDescription
metadataMetadatametadata define the group's identity
catalogCatalogcatalog denotes which type of data the group contains
resource_optsResourceOptsresourceOpts indicates the structure of the underlying kv storage
updated_atgoogle.protobuf.Timestampupdated_at indicates when resources of the group are updated

IntervalRule

IntervalRule is a structured duration

FieldTypeLabelDescription
unitIntervalRule.Unitunit can only be UNIT_HOUR or UNIT_DAY
numuint32

Metadata

Metadata is for multi-tenant, multi-model use

FieldTypeLabelDescription
groupstringgroup contains a set of options, like retention policy, max
namestringname of the entity
iduint32id is the unique identifier of the entity if id is not set, the system will generate a unique id
create_revisionint64readonly. create_revision is the revision of last creation on this key.
mod_revisionint64readonly. mod_revision is the revision of last modification on this key.

ResourceOpts

FieldTypeLabelDescription
shard_numuint32shard_num is the number of shards
segment_intervalIntervalRulesegment_interval indicates the length of a segment
ttlIntervalRulettl indicates time to live, how long the data will be cached

Catalog

NameNumberDescription
CATALOG_UNSPECIFIED0
CATALOG_STREAM1
CATALOG_MEASURE2

IntervalRule.Unit

NameNumberDescription
UNIT_UNSPECIFIED0
UNIT_HOUR1
UNIT_DAY2

banyandb/common/v1/trace.proto

Span

Span is the basic unit of a trace.

FieldTypeLabelDescription
start_timegoogle.protobuf.Timestampstart_time is the start time of the span.
end_timegoogle.protobuf.Timestampend_time is the end time of the span.
errorboolerror indicates whether the span is an error span.
tagsTagrepeatedtags is a list of tags of the span.
messagestringmessage is the message generated by the span.
childrenSpanrepeatedchildren is a list of child spans of the span.
durationint64duration is the duration of the span.

Tag

Tag is the key-value pair of a span.

FieldTypeLabelDescription
keystringkey is the key of the tag.
valuestringvalue is the value of the tag.

Trace

Trace is the top level message of a trace.

FieldTypeLabelDescription
trace_idstringtrace_id is the unique identifier of the trace.
spansSpanrepeatedspans is a list of spans in the trace.
errorboolerror indicates whether the trace is an error trace.

banyandb/database/v1/database.proto

Node

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata
rolesRolerepeated
grpc_addressstring
http_addressstring
created_atgoogle.protobuf.Timestamp

Shard

FieldTypeLabelDescription
iduint64
metadatabanyandb.common.v1.Metadata
catalogbanyandb.common.v1.Catalog
nodestring
totaluint32
updated_atgoogle.protobuf.Timestamp
created_atgoogle.protobuf.Timestamp

Role

NameNumberDescription
ROLE_UNSPECIFIED0
ROLE_META1
ROLE_DATA2
ROLE_LIAISON3

banyandb/model/v1/common.proto

FieldValue

FieldTypeLabelDescription
nullgoogle.protobuf.NullValue
strStr
intInt
binary_databytes
floatFloat

Float

FieldTypeLabelDescription
valuedouble

Int

FieldTypeLabelDescription
valueint64

IntArray

FieldTypeLabelDescription
valueint64repeated

Str

FieldTypeLabelDescription
valuestring

StrArray

FieldTypeLabelDescription
valuestringrepeated

TagFamilyForWrite

FieldTypeLabelDescription
tagsTagValuerepeated

TagValue

FieldTypeLabelDescription
nullgoogle.protobuf.NullValue
strStr
str_arrayStrArray
intInt
int_arrayIntArray
binary_databytes

AggregationFunction

NameNumberDescription
AGGREGATION_FUNCTION_UNSPECIFIED0
AGGREGATION_FUNCTION_MEAN1
AGGREGATION_FUNCTION_MAX2
AGGREGATION_FUNCTION_MIN3
AGGREGATION_FUNCTION_COUNT4
AGGREGATION_FUNCTION_SUM5

MeasureAggregate

NameNumberDescription
MEASURE_AGGREGATE_UNSPECIFIED0
MEASURE_AGGREGATE_MIN1Calculate the minimum value of delta measures.
MEASURE_AGGREGATE_MAX2Calculate the maximum value of delta measures.
MEASURE_AGGREGATE_COUNT3Count the number of delta measures.
MEASURE_AGGREGATE_SUM4Calculate the sum value of delta measures.
MEASURE_AGGREGATE_AVG5Calculate the average value of delta measures.
MEASURE_AGGREGATE_PERCENT6Calculate the percentage of delta measures, where the input matches with the condition.
MEASURE_AGGREGATE_RATE7Calculate the ratio for measures, where the input matches with the condition.
MEASURE_AGGREGATE_HISTOGRAM8Calculate the histogram for delta measures.
MEASURE_AGGREGATE_PERCENTILE29Calculate the {p99, p95, p90, p75, p50} for delta measures.
MEASURE_AGGREGATE_APDEX10Calculate the apdex for delta measures.
MEASURE_AGGREGATE_PERCENTILE11Same like PERCENTILE2, little different on algorithm.

banyandb/model/v1/query.proto

Condition

Condition consists of the query condition with a single binary operator to be imposed For 1:1 BinaryOp, values in condition must be an array with length = 1, while for 1:N BinaryOp, values can be an array with length >= 1.

FieldTypeLabelDescription
namestring
opCondition.BinaryOp
valueTagValue
match_optionCondition.MatchOption

Condition.MatchOption

FieldTypeLabelDescription
analyzerstring
operatorCondition.MatchOption.Operator

Criteria

tag_families are indexed.

FieldTypeLabelDescription
leLogicalExpression
conditionCondition

LogicalExpression

LogicalExpression supports logical operation

FieldTypeLabelDescription
opLogicalExpression.LogicalOpop is a logical operation
leftCriteria
rightCriteria

QueryOrder

QueryOrder means a Sort operation to be done for a given index rule. The index_rule_name refers to the name of a index rule bound to the subject.

FieldTypeLabelDescription
index_rule_namestring
sortSort

Tag

Pair is the building block of a record which is equivalent to a key-value pair. In the context of Trace, it could be metadata of a trace such as service_name, service_instance, etc. Besides, other tags are organized in key-value pair in the underlying storage layer. One should notice that the values can be a multi-value.

FieldTypeLabelDescription
keystring
valueTagValue

TagFamily

FieldTypeLabelDescription
namestring
tagsTagrepeated

TagProjection

TagProjection is used to select the names of keys to be returned.

FieldTypeLabelDescription
tag_familiesTagProjection.TagFamilyrepeated

TagProjection.TagFamily

FieldTypeLabelDescription
namestring
tagsstringrepeated

TimeRange

TimeRange is a range query for uint64, the range here follows left-inclusive and right-exclusive rule, i.e. [begin, end) if both edges exist

FieldTypeLabelDescription
begingoogle.protobuf.Timestamp
endgoogle.protobuf.Timestamp

Condition.BinaryOp

BinaryOp specifies the operation imposed to the given query condition For EQ, NE, LT, GT, LE and GE, only one operand should be given, i.e. one-to-one relationship. HAVING and NOT_HAVING allow multi-value to be the operand such as array/vector, i.e. one-to-many relationship. For example, "keyA" contains "valueA" and "valueB" MATCH performances a full-text search if the tag is analyzed. The string value applies to the same analyzer as the tag, but string array value does not. Each item in a string array is seen as a token instead of a query expression.

NameNumberDescription
BINARY_OP_UNSPECIFIED0
BINARY_OP_EQ1
BINARY_OP_NE2
BINARY_OP_LT3
BINARY_OP_GT4
BINARY_OP_LE5
BINARY_OP_GE6
BINARY_OP_HAVING7
BINARY_OP_NOT_HAVING8
BINARY_OP_IN9
BINARY_OP_NOT_IN10
BINARY_OP_MATCH11

Condition.MatchOption.Operator

NameNumberDescription
OPERATOR_UNSPECIFIED0
OPERATOR_AND1
OPERATOR_OR2

LogicalExpression.LogicalOp

NameNumberDescription
LOGICAL_OP_UNSPECIFIED0
LOGICAL_OP_AND1
LOGICAL_OP_OR2

Sort

NameNumberDescription
SORT_UNSPECIFIED0
SORT_DESC1
SORT_ASC2

banyandb/database/v1/schema.proto

Entity

FieldTypeLabelDescription
tag_namesstringrepeated

FieldSpec

FieldSpec is the specification of field

FieldTypeLabelDescription
namestringname is the identity of a field
field_typeFieldTypefield_type denotes the type of field value
encoding_methodEncodingMethodencoding_method indicates how to encode data during writing
compression_methodCompressionMethodcompression_method indicates how to compress data during writing
aggregate_functionbanyandb.model.v1.MeasureAggregateaggregate_function indicates how to aggregate data

IndexRule

IndexRule defines how to generate indices based on tags and the index type IndexRule should bind to a subject through an IndexRuleBinding to generate proper indices.

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata define the rule's identity
tagsstringrepeatedtags are the combination that refers to an indexed object If the elements in tags are more than 1, the object will generate a multi-tag index Caveat: All tags in a multi-tag MUST have an identical IndexType
typeIndexRule.Typetype is the IndexType of this IndexObject.
updated_atgoogle.protobuf.Timestampupdated_at indicates when the IndexRule is updated
analyzerstringanalyzer analyzes tag value to support the full-text searching for TYPE_INVERTED indices. available analyzers are: - "standard" provides grammar based tokenization - "simple" breaks text into tokens at any non-letter character, such as numbers, spaces, hyphens and apostrophes, discards non-letter characters, and changes uppercase to lowercase. - "keyword" is a “noop” analyzer which returns the entire input string as a single token. - "url" breaks test into tokens at any non-letter and non-digit character.
no_sortboolno_sort indicates whether the index is not for sorting.

IndexRuleBinding

IndexRuleBinding is a bridge to connect severalIndexRules to a subject This binding is valid between begin_at_nanoseconds and expire_at_nanoseconds, that provides flexible strategies to control how to generate time series indices.

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is the identity of this binding
rulesstringrepeatedrules refers to the IndexRule
subjectSubjectsubject indicates the subject of binding action
begin_atgoogle.protobuf.Timestampbegin_at_nanoseconds is the timestamp, after which the binding will be active
expire_atgoogle.protobuf.Timestampexpire_at_nanoseconds it the timestamp, after which the binding will be inactive expire_at_nanoseconds must be larger than begin_at_nanoseconds
updated_atgoogle.protobuf.Timestampupdated_at indicates when the IndexRuleBinding is updated

Measure

Measure intends to store data point

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is the identity of a measure
tag_familiesTagFamilySpecrepeatedtag_families are for filter measures
fieldsFieldSpecrepeatedfields denote measure values
entityEntityentity indicates which tags will be to generate a series and shard a measure
intervalstringinterval indicates how frequently to send a data point valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h", "d".
updated_atgoogle.protobuf.Timestampupdated_at indicates when the measure is updated

MeasureAggregateFunction

FieldTypeLabelDescription
typeFieldTypetype indicates the type of function argument
aggregate_functionbanyandb.model.v1.MeasureAggregateaggregate_function indicates specific function for measure data

Stream

Stream intends to store streaming data, for example, traces or logs

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is the identity of a trace series
tag_familiesTagFamilySpecrepeatedtag_families
entityEntityentity indicates how to generate a series and shard a stream
updated_atgoogle.protobuf.Timestampupdated_at indicates when the stream is updated

Subject

Subject defines which stream or measure would generate indices

FieldTypeLabelDescription
catalogbanyandb.common.v1.Catalogcatalog is where the subject belongs to todo validate plugin exist bug https://github.com/bufbuild/protoc-gen-validate/issues/672
namestringname refers to a stream or measure in a particular catalog

TagFamilySpec

FieldTypeLabelDescription
namestring
tagsTagSpecrepeatedtags defines accepted tags

TagSpec

FieldTypeLabelDescription
namestring
typeTagType
indexed_onlyboolindexed_only indicates whether the tag is stored True: It's indexed only, but not stored False: it's stored and indexed

TopNAggregation

TopNAggregation generates offline TopN statistics for a measure's TopN approximation

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is the identity of an aggregation
source_measurebanyandb.common.v1.Metadatasource_measure denotes the data source of this aggregation
field_namestringfield_name is the name of field used for ranking
field_value_sortbanyandb.model.v1.Sortfield_value_sort indicates how to sort fields ASC: bottomN DESC: topN UNSPECIFIED: topN + bottomN todo validate plugin exist bug https://github.com/bufbuild/protoc-gen-validate/issues/672
group_by_tag_namesstringrepeatedgroup_by_tag_names groups data points into statistical counters
criteriabanyandb.model.v1.Criteriacriteria select partial data points from measure
counters_numberint32counters_number sets the number of counters to be tracked. The default value is 1000
lru_sizeint32lru_size defines how much entry is allowed to be maintained in the memory
updated_atgoogle.protobuf.Timestampupdated_at indicates when the measure is updated

CompressionMethod

NameNumberDescription
COMPRESSION_METHOD_UNSPECIFIED0
COMPRESSION_METHOD_ZSTD1

EncodingMethod

NameNumberDescription
ENCODING_METHOD_UNSPECIFIED0
ENCODING_METHOD_GORILLA1

FieldType

NameNumberDescription
FIELD_TYPE_UNSPECIFIED0
FIELD_TYPE_STRING1
FIELD_TYPE_INT2
FIELD_TYPE_DATA_BINARY3
FIELD_TYPE_FLOAT4

IndexRule.Type

Type determine the index structure under the hood

NameNumberDescription
TYPE_UNSPECIFIED0
TYPE_INVERTED1

TagType

NameNumberDescription
TAG_TYPE_UNSPECIFIED0
TAG_TYPE_STRING1
TAG_TYPE_INT2
TAG_TYPE_STRING_ARRAY3
TAG_TYPE_INT_ARRAY4
TAG_TYPE_DATA_BINARY5

banyandb/database/v1/rpc.proto

GroupRegistryServiceCreateRequest

FieldTypeLabelDescription
groupbanyandb.common.v1.Group

GroupRegistryServiceCreateResponse

GroupRegistryServiceDeleteRequest

FieldTypeLabelDescription
groupstring

GroupRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

GroupRegistryServiceExistRequest

FieldTypeLabelDescription
groupstring

GroupRegistryServiceExistResponse

FieldTypeLabelDescription
has_groupbool

GroupRegistryServiceGetRequest

FieldTypeLabelDescription
groupstring

GroupRegistryServiceGetResponse

FieldTypeLabelDescription
groupbanyandb.common.v1.Group

GroupRegistryServiceListRequest

GroupRegistryServiceListResponse

FieldTypeLabelDescription
groupbanyandb.common.v1.Grouprepeated

GroupRegistryServiceUpdateRequest

FieldTypeLabelDescription
groupbanyandb.common.v1.Group

GroupRegistryServiceUpdateResponse

IndexRuleBindingRegistryServiceCreateRequest

FieldTypeLabelDescription
index_rule_bindingIndexRuleBinding

IndexRuleBindingRegistryServiceCreateResponse

IndexRuleBindingRegistryServiceDeleteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

IndexRuleBindingRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

IndexRuleBindingRegistryServiceExistRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

IndexRuleBindingRegistryServiceExistResponse

FieldTypeLabelDescription
has_groupbool
has_index_rule_bindingbool

IndexRuleBindingRegistryServiceGetRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

IndexRuleBindingRegistryServiceGetResponse

FieldTypeLabelDescription
index_rule_bindingIndexRuleBinding

IndexRuleBindingRegistryServiceListRequest

FieldTypeLabelDescription
groupstring

IndexRuleBindingRegistryServiceListResponse

FieldTypeLabelDescription
index_rule_bindingIndexRuleBindingrepeated

IndexRuleBindingRegistryServiceUpdateRequest

FieldTypeLabelDescription
index_rule_bindingIndexRuleBinding

IndexRuleBindingRegistryServiceUpdateResponse

IndexRuleRegistryServiceCreateRequest

FieldTypeLabelDescription
index_ruleIndexRule

IndexRuleRegistryServiceCreateResponse

IndexRuleRegistryServiceDeleteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

IndexRuleRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

IndexRuleRegistryServiceExistRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

IndexRuleRegistryServiceExistResponse

FieldTypeLabelDescription
has_groupbool
has_index_rulebool

IndexRuleRegistryServiceGetRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

IndexRuleRegistryServiceGetResponse

FieldTypeLabelDescription
index_ruleIndexRule

IndexRuleRegistryServiceListRequest

FieldTypeLabelDescription
groupstring

IndexRuleRegistryServiceListResponse

FieldTypeLabelDescription
index_ruleIndexRulerepeated

IndexRuleRegistryServiceUpdateRequest

FieldTypeLabelDescription
index_ruleIndexRule

IndexRuleRegistryServiceUpdateResponse

MeasureAggregateFunctionServiceSupportRequest

MeasureAggregateFunctionServiceSupportResponse

FieldTypeLabelDescription
measure_aggregate_functionMeasureAggregateFunctionrepeated

MeasureRegistryServiceCreateRequest

FieldTypeLabelDescription
measureMeasure

MeasureRegistryServiceCreateResponse

FieldTypeLabelDescription
mod_revisionint64

MeasureRegistryServiceDeleteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

MeasureRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

MeasureRegistryServiceExistRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

MeasureRegistryServiceExistResponse

FieldTypeLabelDescription
has_groupbool
has_measurebool

MeasureRegistryServiceGetRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

MeasureRegistryServiceGetResponse

FieldTypeLabelDescription
measureMeasure

MeasureRegistryServiceListRequest

FieldTypeLabelDescription
groupstring

MeasureRegistryServiceListResponse

FieldTypeLabelDescription
measureMeasurerepeated

MeasureRegistryServiceUpdateRequest

FieldTypeLabelDescription
measureMeasure

MeasureRegistryServiceUpdateResponse

FieldTypeLabelDescription
mod_revisionint64

StreamRegistryServiceCreateRequest

FieldTypeLabelDescription
streamStream

StreamRegistryServiceCreateResponse

FieldTypeLabelDescription
mod_revisionint64

StreamRegistryServiceDeleteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

StreamRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

StreamRegistryServiceExistRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

StreamRegistryServiceExistResponse

FieldTypeLabelDescription
has_groupbool
has_streambool

StreamRegistryServiceGetRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

StreamRegistryServiceGetResponse

FieldTypeLabelDescription
streamStream

StreamRegistryServiceListRequest

FieldTypeLabelDescription
groupstring

StreamRegistryServiceListResponse

FieldTypeLabelDescription
streamStreamrepeated

StreamRegistryServiceUpdateRequest

FieldTypeLabelDescription
streamStream

StreamRegistryServiceUpdateResponse

FieldTypeLabelDescription
mod_revisionint64

TopNAggregationRegistryServiceCreateRequest

FieldTypeLabelDescription
top_n_aggregationTopNAggregation

TopNAggregationRegistryServiceCreateResponse

TopNAggregationRegistryServiceDeleteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

TopNAggregationRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

TopNAggregationRegistryServiceExistRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

TopNAggregationRegistryServiceExistResponse

FieldTypeLabelDescription
has_groupbool
has_top_n_aggregationbool

TopNAggregationRegistryServiceGetRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

TopNAggregationRegistryServiceGetResponse

FieldTypeLabelDescription
top_n_aggregationTopNAggregation

TopNAggregationRegistryServiceListRequest

FieldTypeLabelDescription
groupstring

TopNAggregationRegistryServiceListResponse

FieldTypeLabelDescription
top_n_aggregationTopNAggregationrepeated

TopNAggregationRegistryServiceUpdateRequest

FieldTypeLabelDescription
top_n_aggregationTopNAggregation

TopNAggregationRegistryServiceUpdateResponse

GroupRegistryService

Method NameRequest TypeResponse TypeDescription
CreateGroupRegistryServiceCreateRequestGroupRegistryServiceCreateResponse
UpdateGroupRegistryServiceUpdateRequestGroupRegistryServiceUpdateResponse
DeleteGroupRegistryServiceDeleteRequestGroupRegistryServiceDeleteResponse
GetGroupRegistryServiceGetRequestGroupRegistryServiceGetResponse
ListGroupRegistryServiceListRequestGroupRegistryServiceListResponse
ExistGroupRegistryServiceExistRequestGroupRegistryServiceExistResponseExist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead

IndexRuleBindingRegistryService

Method NameRequest TypeResponse TypeDescription
CreateIndexRuleBindingRegistryServiceCreateRequestIndexRuleBindingRegistryServiceCreateResponse
UpdateIndexRuleBindingRegistryServiceUpdateRequestIndexRuleBindingRegistryServiceUpdateResponse
DeleteIndexRuleBindingRegistryServiceDeleteRequestIndexRuleBindingRegistryServiceDeleteResponse
GetIndexRuleBindingRegistryServiceGetRequestIndexRuleBindingRegistryServiceGetResponse
ListIndexRuleBindingRegistryServiceListRequestIndexRuleBindingRegistryServiceListResponse
ExistIndexRuleBindingRegistryServiceExistRequestIndexRuleBindingRegistryServiceExistResponseExist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead

IndexRuleRegistryService

Method NameRequest TypeResponse TypeDescription
CreateIndexRuleRegistryServiceCreateRequestIndexRuleRegistryServiceCreateResponse
UpdateIndexRuleRegistryServiceUpdateRequestIndexRuleRegistryServiceUpdateResponse
DeleteIndexRuleRegistryServiceDeleteRequestIndexRuleRegistryServiceDeleteResponse
GetIndexRuleRegistryServiceGetRequestIndexRuleRegistryServiceGetResponse
ListIndexRuleRegistryServiceListRequestIndexRuleRegistryServiceListResponse
ExistIndexRuleRegistryServiceExistRequestIndexRuleRegistryServiceExistResponseExist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead

MeasureAggregateFunctionService

Method NameRequest TypeResponse TypeDescription
SupportMeasureAggregateFunctionServiceSupportRequestMeasureAggregateFunctionServiceSupportResponseSupport doesn't need metadata, it's static and stateless.

MeasureRegistryService

Method NameRequest TypeResponse TypeDescription
CreateMeasureRegistryServiceCreateRequestMeasureRegistryServiceCreateResponse
UpdateMeasureRegistryServiceUpdateRequestMeasureRegistryServiceUpdateResponse
DeleteMeasureRegistryServiceDeleteRequestMeasureRegistryServiceDeleteResponse
GetMeasureRegistryServiceGetRequestMeasureRegistryServiceGetResponse
ListMeasureRegistryServiceListRequestMeasureRegistryServiceListResponse
ExistMeasureRegistryServiceExistRequestMeasureRegistryServiceExistResponseExist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead

StreamRegistryService

Method NameRequest TypeResponse TypeDescription
CreateStreamRegistryServiceCreateRequestStreamRegistryServiceCreateResponse
UpdateStreamRegistryServiceUpdateRequestStreamRegistryServiceUpdateResponse
DeleteStreamRegistryServiceDeleteRequestStreamRegistryServiceDeleteResponse
GetStreamRegistryServiceGetRequestStreamRegistryServiceGetResponse
ListStreamRegistryServiceListRequestStreamRegistryServiceListResponse
ExistStreamRegistryServiceExistRequestStreamRegistryServiceExistResponseExist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead

TopNAggregationRegistryService

Method NameRequest TypeResponse TypeDescription
CreateTopNAggregationRegistryServiceCreateRequestTopNAggregationRegistryServiceCreateResponse
UpdateTopNAggregationRegistryServiceUpdateRequestTopNAggregationRegistryServiceUpdateResponse
DeleteTopNAggregationRegistryServiceDeleteRequestTopNAggregationRegistryServiceDeleteResponse
GetTopNAggregationRegistryServiceGetRequestTopNAggregationRegistryServiceGetResponse
ListTopNAggregationRegistryServiceListRequestTopNAggregationRegistryServiceListResponse
ExistTopNAggregationRegistryServiceExistRequestTopNAggregationRegistryServiceExistResponseExist doesn't expose an HTTP endpoint. Please use HEAD method to touch Get instead

banyandb/measure/v1/query.proto

DataPoint

DataPoint is stored in Measures

FieldTypeLabelDescription
timestampgoogle.protobuf.Timestamptimestamp is in the timeunit of milliseconds.
tag_familiesbanyandb.model.v1.TagFamilyrepeatedtag_families contains tags selected in the projection
fieldsDataPoint.Fieldrepeatedfields contains fields selected in the projection
siduint64sid is the series id of the data point
versionint64version is the version of the data point in a series sid, timestamp and version are used to identify a data point

DataPoint.Field

FieldTypeLabelDescription
namestring
valuebanyandb.model.v1.FieldValue

QueryRequest

QueryRequest is the request contract for query.

FieldTypeLabelDescription
groupsstringrepeatedgroups indicate where the data points are stored.
namestringname is the identity of a measure.
time_rangebanyandb.model.v1.TimeRangetime_range is a range query with begin/end time of entities in the timeunit of milliseconds.
criteriabanyandb.model.v1.Criteriatag_families are indexed.
tag_projectionbanyandb.model.v1.TagProjectiontag_projection can be used to select tags of the data points in the response
field_projectionQueryRequest.FieldProjectionfield_projection can be used to select fields of the data points in the response
group_byQueryRequest.GroupBygroup_by groups data points based on their field value for a specific tag and use field_name as the projection name
aggQueryRequest.Aggregationagg aggregates data points based on a field
topQueryRequest.Toptop limits the result based on a particular field. If order_by is specified, top sorts the dataset based on order_by's output
offsetuint32offset is used to support pagination, together with the following limit. If top is specified, offset processes the dataset based on top's output
limituint32limit is used to impose a boundary on the number of records being returned. If top is specified, limit processes the dataset based on top's output
order_bybanyandb.model.v1.QueryOrderorder_by is given to specify the sort for a tag.
tracebooltrace is used to enable trace for the query

QueryRequest.Aggregation

FieldTypeLabelDescription
functionbanyandb.model.v1.AggregationFunction
field_namestringfield_name must be one of files indicated by the field_projection

QueryRequest.FieldProjection

FieldTypeLabelDescription
namesstringrepeated

QueryRequest.GroupBy

FieldTypeLabelDescription
tag_projectionbanyandb.model.v1.TagProjectiontag_projection must be a subset of the tag_projection of QueryRequest
field_namestringfield_name must be one of fields indicated by field_projection

QueryRequest.Top

FieldTypeLabelDescription
numberint32number set the how many items should be returned
field_namestringfield_name must be one of files indicated by the field_projection
field_value_sortbanyandb.model.v1.Sortfield_value_sort indicates how to sort fields ASC: bottomN DESC: topN UNSPECIFIED: topN

QueryResponse

QueryResponse is the response for a query to the Query module.

FieldTypeLabelDescription
data_pointsDataPointrepeateddata_points are the actual data returned
tracebanyandb.common.v1.Tracetrace contains the trace information of the query when trace is enabled

banyandb/measure/v1/topn.proto

TopNList

TopNList contains a series of topN items

FieldTypeLabelDescription
timestampgoogle.protobuf.Timestamptimestamp is in the timeunit of milliseconds.
itemsTopNList.Itemrepeateditems contains top-n items in a list

TopNList.Item

FieldTypeLabelDescription
entitybanyandb.model.v1.Tagrepeated
valuebanyandb.model.v1.FieldValue

TopNRequest

TopNRequest is the request contract for query.

FieldTypeLabelDescription
groupsstringrepeatedgroups indicate where the data points are stored.
namestringname is the identity of a measure.
time_rangebanyandb.model.v1.TimeRangetime_range is a range query with begin/end time of entities in the timeunit of milliseconds.
top_nint32top_n set the how many items should be returned in each list.
aggbanyandb.model.v1.AggregationFunctionagg aggregates lists grouped by field names in the time_range
conditionsbanyandb.model.v1.Conditionrepeatedcriteria select counters. Only equals are acceptable.
field_value_sortbanyandb.model.v1.Sortfield_value_sort indicates how to sort fields
tracebooltrace is used to enable trace for the query

TopNResponse

TopNResponse is the response for a query to the Query module.

FieldTypeLabelDescription
listsTopNListrepeatedlists contain a series topN lists ranked by timestamp if agg_func in query request is specified, lists' size should be one.
tracebanyandb.common.v1.Tracetrace contains the trace information of the query when trace is enabled

banyandb/model/v1/write.proto

Status

Status is the response status for write

NameNumberDescription
STATUS_UNSPECIFIED0
STATUS_SUCCEED1
STATUS_INVALID_TIMESTAMP2
STATUS_NOT_FOUND3
STATUS_EXPIRED_SCHEMA4
STATUS_INTERNAL_ERROR5

banyandb/measure/v1/write.proto

DataPointValue

DataPointValue is the data point for writing. It only contains values.

FieldTypeLabelDescription
timestampgoogle.protobuf.Timestamptimestamp is in the timeunit of milliseconds.
tag_familiesbanyandb.model.v1.TagFamilyForWriterepeatedthe order of tag_families' items match the measure schema
fieldsbanyandb.model.v1.FieldValuerepeatedthe order of fields match the measure schema
versionint64the version of the data point
typeDataPointValue.Type

InternalWriteRequest

FieldTypeLabelDescription
shard_iduint32
series_hashbytes
entity_valuesbanyandb.model.v1.TagValuerepeated
requestWriteRequest

WriteRequest

WriteRequest is the request contract for write

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatathe metadata is required.
data_pointDataPointValuethe data_point is required.
message_iduint64the message_id is required.

WriteResponse

WriteResponse is the response contract for write

FieldTypeLabelDescription
message_iduint64the message_id from request.
statusbanyandb.model.v1.Statusstatus indicates the request processing result
metadatabanyandb.common.v1.Metadatathe metadata from request when request fails

DataPointValue.Type

the type of the data point cumulative or delta

NameNumberDescription
TYPE_UNSPECIFIED0TYPE_UNSPECIFIED is the default value.
TYPE_CUMULATIVE1TYPE_CUMULATIVE is the cumulative data
TYPE_DELTA2TYPE_DELTA is the delta data

banyandb/measure/v1/rpc.proto

MeasureService

Method NameRequest TypeResponse TypeDescription
QueryQueryRequestQueryResponse
WriteWriteRequest streamWriteResponse stream
TopNTopNRequestTopNResponse

banyandb/property/v1/property.proto

Metadata

Metadata is for multi-tenant use

FieldTypeLabelDescription
containerbanyandb.common.v1.Metadatacontainer is created when it receives the first property
idstringid identifies a property

Property

Property stores the user defined data

FieldTypeLabelDescription
metadataMetadatametadata is the identity of a property
tagsbanyandb.model.v1.Tagrepeatedtag stores the content of a property
updated_atgoogle.protobuf.Timestampupdated_at indicates when the property is updated
lease_idint64readonly. lease_id is the ID of the lease that attached to key.
ttlstringttl indicates the time to live of the property. It's a string in the format of "1h", "2m", "3s", "1500ms". It defaults to 0s, which means the property never expires. The minimum allowed ttl is 1s.

banyandb/property/v1/rpc.proto

ApplyRequest

FieldTypeLabelDescription
propertyProperty
strategyApplyRequest.Strategystrategy indicates how to update a property. It defaults to STRATEGY_MERGE

ApplyResponse

FieldTypeLabelDescription
createdboolcreated indicates whether the property existed. True: the property is absent. False: the property existed.
tags_numuint32
lease_idint64

DeleteRequest

FieldTypeLabelDescription
metadataMetadata
tagsstringrepeated

DeleteResponse

FieldTypeLabelDescription
deletedbool
tags_numuint32

GetRequest

FieldTypeLabelDescription
metadataMetadata
tagsstringrepeated

GetResponse

FieldTypeLabelDescription
propertyProperty

KeepAliveRequest

FieldTypeLabelDescription
lease_idint64

KeepAliveResponse

ListRequest

FieldTypeLabelDescription
containerbanyandb.common.v1.Metadata
idsstringrepeated
tagsstringrepeated

ListResponse

FieldTypeLabelDescription
propertyPropertyrepeated

ApplyRequest.Strategy

NameNumberDescription
STRATEGY_UNSPECIFIED0
STRATEGY_MERGE1
STRATEGY_REPLACE2

PropertyService

Method NameRequest TypeResponse TypeDescription
ApplyApplyRequestApplyResponseApply creates a property if it's absent, or update a existed one based on a strategy.
DeleteDeleteRequestDeleteResponse
GetGetRequestGetResponse
ListListRequestListResponse
KeepAliveKeepAliveRequestKeepAliveResponse

banyandb/stream/v1/query.proto

Element

Element represents (stream context) a Span defined in Google Dapper paper or equivalently a Segment in Skywalking. (Log context) a log

FieldTypeLabelDescription
element_idstringelement_id could be span_id of a Span or segment_id of a Segment in the context of stream
timestampgoogle.protobuf.Timestamptimestamp represents a millisecond 1) either the start time of a Span/Segment, 2) or the timestamp of a log
tag_familiesbanyandb.model.v1.TagFamilyrepeatedfields contains all indexed Field. Some typical names, - stream_id - duration - service_name - service_instance_id - end_time_milliseconds

QueryRequest

QueryRequest is the request contract for query.

FieldTypeLabelDescription
groupsstringrepeatedgroups indicate where the elements are stored.
namestringname is the identity of a stream.
time_rangebanyandb.model.v1.TimeRangetime_range is a range query with begin/end time of entities in the timeunit of milliseconds. In the context of stream, it represents the range of the startTime for spans/segments, while in the context of Log, it means the range of the timestamp(s) for logs. it is always recommended to specify time range for performance reason
offsetuint32offset is used to support pagination, together with the following limit
limituint32limit is used to impose a boundary on the number of records being returned
order_bybanyandb.model.v1.QueryOrderorder_by is given to specify the sort for a field. So far, only fields in the type of Integer are supported
criteriabanyandb.model.v1.Criteriatag_families are indexed.
projectionbanyandb.model.v1.TagProjectionprojection can be used to select the key names of the element in the response
tracebooltrace is used to enable trace for the query

QueryResponse

QueryResponse is the response for a query to the Query module.

FieldTypeLabelDescription
elementsElementrepeatedelements are the actual data returned
tracebanyandb.common.v1.Tracetrace contains the trace information of the query when trace is enabled

banyandb/stream/v1/write.proto

ElementValue

FieldTypeLabelDescription
element_idstringelement_id could be span_id of a Span or segment_id of a Segment in the context of stream
timestampgoogle.protobuf.Timestamptimestamp is in the timeunit of milliseconds. It represents 1) either the start time of a Span/Segment, 2) or the timestamp of a log
tag_familiesbanyandb.model.v1.TagFamilyForWriterepeatedthe order of tag_families' items match the stream schema

InternalWriteRequest

FieldTypeLabelDescription
shard_iduint32
series_hashbytes
entity_valuesbanyandb.model.v1.TagValuerepeated
requestWriteRequest

WriteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatathe metadata is required.
elementElementValuethe element is required.
message_iduint64the message_id is required.

WriteResponse

FieldTypeLabelDescription
message_iduint64the message_id from request.
statusbanyandb.model.v1.Statusstatus indicates the request processing result
metadatabanyandb.common.v1.Metadatathe metadata from request when request fails

banyandb/stream/v1/rpc.proto

StreamService

Method NameRequest TypeResponse TypeDescription
QueryQueryRequestQueryResponse
WriteWriteRequest streamWriteResponse stream

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)