Skip to content
Merged
Show file tree
Hide file tree
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
43 changes: 1 addition & 42 deletions apis/datasets/v1/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,11 @@
package datasets.v1;

import "datasets/v1/dataset_type.proto";
// https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp
import "google/protobuf/timestamp.proto";
import "tilebox/v1/id.proto";
import "tilebox/v1/query.proto";

option features.field_presence = IMPLICIT;

// LegacyPagination - used for backwards compatibility, will be removed as soon as all datasets are migrated
message LegacyPagination {
// The maximum number of entries to return.
int64 limit = 1 [features.field_presence = EXPLICIT];
// Return entries starting after this entry.
// This is the id of the last entry returned in the previous page as the next parameter in each paginated query.
string starting_after = 2 [features.field_presence = EXPLICIT];
}

// Any is a message that can hold any other message as bytes.
// We don't use google.protobuf.Any because we want the JSON representation of the value field to be bytes.
message Any {
Expand All @@ -53,42 +42,12 @@
* Messages relevant for all Tilebox datasets
*/

// DatapointMetadata contains the metadata for a single data point.
// legacy, only relevant for old endpoints
message DatapointMetadata {
// The time the message was received by the on-board computer.
google.protobuf.Timestamp event_time = 1;
// The time the message was ingested by Tilebox.
google.protobuf.Timestamp ingestion_time = 2;
// The external id of the datapoint.
string id = 3 [features.field_presence = EXPLICIT];
}

// DatapointPage is a single page of data points of a Tilebox dataset, such as it is returned by a ForInterval query
message DatapointPage {
// A metadata for a datapoint.
repeated DatapointMetadata meta = 1;
// The datapoints.
RepeatedAny data = 2;
// The pagination parameters for the next page.
LegacyPagination next_page = 3 [features.field_presence = EXPLICIT];
}

// Datapoint is a single datapoint in a Tilebox Dataset
message Datapoint {
// A metadata for a datapoint.
DatapointMetadata meta = 1;
// The data.
Any data = 2;
}

// Collection contains basic information about a dataset collection
message Collection {
// Here for backwards compatibility, to be removed in the future.
string legacy_id = 1;
reserved 1; // was a
string name = 2;
tilebox.v1.ID id = 3;
}

Check failure on line 50 in apis/datasets/v1/core.proto

View workflow job for this annotation

GitHub Actions / Buf

Previously present field "1" with name "legacy_id" on message "Collection" was deleted without reserving the name "legacy_id".

// CollectionInfo contains information about the data available in a dataset collection
message CollectionInfo {
Expand Down
38 changes: 0 additions & 38 deletions apis/datasets/v1/data_access.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,6 @@ import "tilebox/v1/query.proto";

option features.field_presence = IMPLICIT;

// Legacy message, to be removed in the future.
// GetDatasetForIntervalRequest contains the request parameters for retrieving data for a time interval.
message GetDatasetForIntervalRequest {
// The collection id.
string collection_id = 1;

// Either time interval or datapoint interval must be set, but not both.
// The time interval for which data is requested.
tilebox.v1.TimeInterval time_interval = 2;
// The datapoint interval for which data is requested.
tilebox.v1.IDInterval datapoint_interval = 6;

// The pagination parameters for this request.
LegacyPagination page = 3 [features.field_presence = EXPLICIT];
// If true, the datapoint data is not returned.
bool skip_data = 4;
// If true, the datapoint metadata is not returned.
// If both skip_data and skip_meta are true,
// the response will only consist of a list of datapoint ids without any additional data or metadata.
bool skip_meta = 5;
}

// Legacy message, to be removed in the future.
// GetDatapointByIdRequest contains the request parameters for retrieving a single data point in a collection by its id.
message GetDatapointByIdRequest {
// The collection id.
string collection_id = 1;
// The id of the requested data point.
string id = 2;
// If true, only the datapoint metadata is returned.
bool skip_data = 3;
}

// QueryByIDRequest contains the request parameters for retrieving a single data point by its id.
message QueryByIDRequest {
// The dataset id to query. If not set, the dataset is derived from the collection ids, in which case there must be at least one collection id set.
Expand Down Expand Up @@ -135,11 +102,6 @@ message QueryResultPage {

// DataAccessService provides data access and querying capabilities for Tilebox datasets.
service DataAccessService {
// legacy endpoint, kept around for backwards compatibility with older python clients for now
rpc GetDatasetForInterval(GetDatasetForIntervalRequest) returns (DatapointPage) {}
// legacy endpoint, kept around for backwards compatibility with older python clients for now
rpc GetDatapointByID(GetDatapointByIdRequest) returns (Datapoint) {}

// QueryByID returns a single data point by its ID.
rpc QueryByID(QueryByIDRequest) returns (Any) {}

Expand Down
Loading