Protocol Documentation

Table of Contents

belifeline/models/v1/types.proto

Top

APIKey

API Key

FieldTypeLabelDescription
key string

Content

Format of Koyo content (in KoyoData)

FieldTypeLabelDescription
point GeoPoint

value float

optional Content.OptionalEntry repeated

Content.OptionalEntry

FieldTypeLabelDescription
key string

value string

DateUntil

Represents a date interval from before to after

FieldTypeLabelDescription
before google.protobuf.Timestamp

after google.protobuf.Timestamp

GeoPoint

FieldTypeLabelDescription
lat float

lng float

ULID

ULID https://github.com/ulid/spec

FieldTypeLabelDescription
value string

Version

Semantic versioning https://semver.org/

FieldTypeLabelDescription
value string

DataType

Format of data returned by Koyo (in KoyoData)

NameNumberDescription
DATA_TYPE_UNSPECIFIED 0

DATA_TYPE_IMAGE 1

DATA_TYPE_CSV 2

DATA_TYPE_JSON 3

belifeline/models/v1/extinfo.proto

Top

ExampleInfoExampleData

WARNING: THIS IS A SAMPLE

FieldTypeLabelDescription
example_data_id ULID

point GeoPoint

image bytes

ExternalInformation

External Information

ExternalInformation is basic information about External Information

FieldTypeLabelDescription
external_id ULID optional

external_name string optional

external_description string optional

license string optional

External Information's license type

license_description string optional

external_data_ids ULID repeated

External Information's data list

api_key APIKey optional

Required for update notification for this ExternalInformation

first_entry_at google.protobuf.Timestamp optional

Immutable at the date and time External Information is registered in the belifeline

last_updated_at google.protobuf.Timestamp optional

Time External Information last updated

updated_history string repeated

History of updates to External Information

belifeline/models/v1/koyo.proto

Top

KoyoData

Koyo Data

KoyoData is the data returned by Koyo. That is, data generated (calculated) by Koyo's algorithm.

FieldTypeLabelDescription
koyo_data_id ULID optional

koyo_id ULID optional

koyo_scale float optional

The scale used when generating data

koyo_data_params KoyoData.KoyoDataParamsEntry repeated

Parameters used when generating data

content Content repeated

Data content

entry_at google.protobuf.Timestamp optional

Time data was generated

target_at google.protobuf.Timestamp optional

Time data is targeted (external information daat time)

KoyoData.KoyoDataParamsEntry

FieldTypeLabelDescription
key string

value string

KoyoInformation

Koyos Information

KoyoInformation is basic information about Koyo

FieldTypeLabelDescription
koyo_id ULID optional

koyo_name string optional

koyo_description string optional

Koyo's developers explain what this Koyo is all about

need_external ULID repeated

List of ExternalInformation required for Koyo to work

koyo_params KoyoInformation.KoyoParamsEntry repeated

Koyo parameters and their default values.

koyo_scales float repeated

List of Koyo scale (data resolution) (Area where data exists)

koyo_data_ids ULID repeated

Koyo's data list

version Version optional

license string optional

Koyo's license type

ext_licenses string repeated

List of licenses on which Koyo depends

data_type DataType optional

Format of data returned by Koyo (in KoyoData)

api_key APIKey optional

first_entry_at google.protobuf.Timestamp optional

Immutable at the date and time Koyo is registered in the belifeline

last_entry_at google.protobuf.Timestamp optional

Time koyo last added data

last_updated_at google.protobuf.Timestamp optional

Time koyo information last updated

KoyoInformation.KoyoParamsEntry

FieldTypeLabelDescription
key string

value string

belifeline/models/v1/provider.proto

Top

ClientInformation

Client Information

ClientInformation is basic information about Client

FieldTypeLabelDescription
client_id ULID optional

username string optional

api_key APIKey optional

created_at google.protobuf.Timestamp optional

Immutable at the date and time the client is registered in the belifeline

last_used_at google.protobuf.Timestamp optional

Time the client last used the belifeline

last_updated_at google.protobuf.Timestamp optional

Time the client information last updated

belifeline/v1/api.proto

Top

CheckRequest

FieldTypeLabelDescription
service string

CheckResponse

FieldTypeLabelDescription
status ServingStatus

ClientDeleteRequest

FieldTypeLabelDescription
client_id belifeline.models.v1.ULID

ClientDeleteResponse

FieldTypeLabelDescription
client_id belifeline.models.v1.ULID

ClientListRequest

FieldTypeLabelDescription
limit int32

ClientListResponse

FieldTypeLabelDescription
client_information_list belifeline.models.v1.ClientInformation repeated

ClientRevokeRequest

FieldTypeLabelDescription
client_id belifeline.models.v1.ULID

ClientRevokeResponse

FieldTypeLabelDescription
client_id belifeline.models.v1.ULID

api_key belifeline.models.v1.APIKey

ClientSetRequest

FieldTypeLabelDescription
client_id belifeline.models.v1.ULID optional

username string

ClientSetResponse

FieldTypeLabelDescription
client_information belifeline.models.v1.ClientInformation

ExternalInformationDeleteRequest

FieldTypeLabelDescription
extinfo_id belifeline.models.v1.ULID

ExternalInformationDeleteResponse

FieldTypeLabelDescription
extinfo_id belifeline.models.v1.ULID

ExternalInformationGetRequest

FieldTypeLabelDescription
extinfo_id belifeline.models.v1.ULID

ExternalInformationGetResponse

FieldTypeLabelDescription
data bytes

ExternalInformationListRequest

FieldTypeLabelDescription
limit int32

ExternalInformationListResponse

FieldTypeLabelDescription
external_information_list belifeline.models.v1.ExternalInformation repeated

ExternalInformationSetRequest

FieldTypeLabelDescription
external_information belifeline.models.v1.ExternalInformation

ExternalInformationSetResponse

FieldTypeLabelDescription
external_information belifeline.models.v1.ExternalInformation

ExternalInformationUpdateNotificationRequest

FieldTypeLabelDescription
extinfo_id belifeline.models.v1.ULID

ExternalInformationUpdateNotificationResponse

FieldTypeLabelDescription
extinfo_id belifeline.models.v1.ULID

KoyoAPIRevokeRequest

FieldTypeLabelDescription
koyo_id belifeline.models.v1.ULID

api_key belifeline.models.v1.APIKey

KoyoAPIRevokeResponse

FieldTypeLabelDescription
koyo_id belifeline.models.v1.ULID

api_key belifeline.models.v1.APIKey

KoyoCreateRequest

FieldTypeLabelDescription
koyo_information belifeline.models.v1.KoyoInformation

KoyoCreateResponse

FieldTypeLabelDescription
koyo_information belifeline.models.v1.KoyoInformation

KoyoDataAddRequest

FieldTypeLabelDescription
koyo_data belifeline.models.v1.KoyoData

KoyoDataAddResponse

FieldTypeLabelDescription
koyo_data_id belifeline.models.v1.ULID

KoyoDataGetRequest

FieldTypeLabelDescription
koyo_data_id belifeline.models.v1.ULID

KoyoDataGetResponse

FieldTypeLabelDescription
koyo_data belifeline.models.v1.KoyoData

KoyoDeleteRequest

FieldTypeLabelDescription
koyo_id belifeline.models.v1.ULID

KoyoDeleteResponse

FieldTypeLabelDescription
koyo_id belifeline.models.v1.ULID

KoyoListRequest

FieldTypeLabelDescription
limit int32

KoyoListResponse

FieldTypeLabelDescription
koyo_information_list belifeline.models.v1.KoyoInformation repeated

KoyoUpdateRequest

FieldTypeLabelDescription
koyo_information belifeline.models.v1.KoyoInformation

KoyoUpdateResponse

FieldTypeLabelDescription
koyo_information belifeline.models.v1.KoyoInformation

WatchRequest

FieldTypeLabelDescription
service string

WatchResponse

FieldTypeLabelDescription
status ServingStatus

ServingStatus

HealthService

NameNumberDescription
SERVING_STATUS_UNSPECIFIED 0

SERVING_STATUS_UNKNOWN 1

SERVING_STATUS_SERVING 2

SERVING_STATUS_NOT_SERVING 3

SERVING_STATUS_SERVICE_UNKNOWN 4

Used only by the Watch method.

belifeline/v1/main.proto

Top

AdminService

Services related to system administration, such as account creation

Administrator (Admin API Key) authentication is required

Method NameRequest TypeResponse TypeDescription
ClientSet ClientSetRequest ClientSetResponse

Create or update a client. The client ID is automatically generated and returned

ClientList ClientListRequest ClientListResponse

List all clients

ClientDelete ClientDeleteRequest ClientDeleteResponse

Delete a client

ClientRevoke ClientRevokeRequest ClientRevokeResponse

Revoke and renew the client's API key. The client's API key is automatically generated and returned

ExternalInformationSet ExternalInformationSetRequest ExternalInformationSetResponse

Create or update an external information. The external information provider ID is automatically generated and returned

ExternalInformationDelete ExternalInformationDeleteRequest ExternalInformationDeleteResponse

Delete an external information

KoyoCreate KoyoCreateRequest KoyoCreateResponse

Create or update a koyo The koyo ID is automatically generated and returned

KoyoDelete KoyoDeleteRequest KoyoDeleteResponse

Delete a koyo

KoyoAPIRevoke KoyoAPIRevokeRequest KoyoAPIRevokeResponse

Revoke and renew the koyo's API key. The koyo's API key is automatically generated and returned

ExternalInformationService

Service that provides something for updating external information

ExternalInformation (External Information API Key) authentication is required.

Method NameRequest TypeResponse TypeDescription
ExternalInformationUpdateNotification ExternalInformationUpdateNotificationRequest ExternalInformationUpdateNotificationResponse

rpc to inform kizuna that extinfo (External API and other information) has been updated

HealthService

Health Check Service

No authentication is required and public access is always available

Method NameRequest TypeResponse TypeDescription
Check CheckRequest CheckResponse

Check the health of the service

Watch WatchRequest WatchResponse stream

Watch the health of the service

KoyoService

Koyo itself is a service for interacting with Kizuna

Koyo (Koyo Information API Key) authentication is required.

Method NameRequest TypeResponse TypeDescription
KoyoUpdate KoyoUpdateRequest KoyoUpdateResponse

Update koyo information

KoyoDataAdd KoyoDataAddRequest KoyoDataAddResponse

After koyo processes the data, it calls this rpc to store the generated data (in permanent storage via kizuna)

ProviderService

Service as an information provider provided by belifeline

Client (Client Information API Key) authentication is required

Method NameRequest TypeResponse TypeDescription
ExternalInformationList ExternalInformationListRequest ExternalInformationListResponse

List all external information

KoyoList KoyoListRequest KoyoListResponse

List all koyo information

ExternalInformationGet ExternalInformationGetRequest ExternalInformationGetResponse

Get basic information about External Information

KoyoDataGet KoyoDataGetRequest KoyoDataGetResponse

Get koyo data generated by Koyo

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)