Skip to content

Commit 232c1d9

Browse files
Remove legtacy datasets api (#43)
1 parent ae360ae commit 232c1d9

2 files changed

Lines changed: 1 addition & 80 deletions

File tree

‎apis/datasets/v1/core.proto‎

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,11 @@ edition = "2023";
1717
package datasets.v1;
1818

1919
import "datasets/v1/dataset_type.proto";
20-
// https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp
21-
import "google/protobuf/timestamp.proto";
2220
import "tilebox/v1/id.proto";
2321
import "tilebox/v1/query.proto";
2422

2523
option features.field_presence = IMPLICIT;
2624

27-
// LegacyPagination - used for backwards compatibility, will be removed as soon as all datasets are migrated
28-
message LegacyPagination {
29-
// The maximum number of entries to return.
30-
int64 limit = 1 [features.field_presence = EXPLICIT];
31-
// Return entries starting after this entry.
32-
// This is the id of the last entry returned in the previous page as the next parameter in each paginated query.
33-
string starting_after = 2 [features.field_presence = EXPLICIT];
34-
}
35-
3625
// Any is a message that can hold any other message as bytes.
3726
// We don't use google.protobuf.Any because we want the JSON representation of the value field to be bytes.
3827
message Any {
@@ -53,39 +42,9 @@ message RepeatedAny {
5342
* Messages relevant for all Tilebox datasets
5443
*/
5544

56-
// DatapointMetadata contains the metadata for a single data point.
57-
// legacy, only relevant for old endpoints
58-
message DatapointMetadata {
59-
// The time the message was received by the on-board computer.
60-
google.protobuf.Timestamp event_time = 1;
61-
// The time the message was ingested by Tilebox.
62-
google.protobuf.Timestamp ingestion_time = 2;
63-
// The external id of the datapoint.
64-
string id = 3 [features.field_presence = EXPLICIT];
65-
}
66-
67-
// DatapointPage is a single page of data points of a Tilebox dataset, such as it is returned by a ForInterval query
68-
message DatapointPage {
69-
// A metadata for a datapoint.
70-
repeated DatapointMetadata meta = 1;
71-
// The datapoints.
72-
RepeatedAny data = 2;
73-
// The pagination parameters for the next page.
74-
LegacyPagination next_page = 3 [features.field_presence = EXPLICIT];
75-
}
76-
77-
// Datapoint is a single datapoint in a Tilebox Dataset
78-
message Datapoint {
79-
// A metadata for a datapoint.
80-
DatapointMetadata meta = 1;
81-
// The data.
82-
Any data = 2;
83-
}
84-
8545
// Collection contains basic information about a dataset collection
8646
message Collection {
87-
// Here for backwards compatibility, to be removed in the future.
88-
string legacy_id = 1;
47+
reserved 1; // was a
8948
string name = 2;
9049
tilebox.v1.ID id = 3;
9150
}

‎apis/datasets/v1/data_access.proto‎

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,6 @@ import "tilebox/v1/query.proto";
1212

1313
option features.field_presence = IMPLICIT;
1414

15-
// Legacy message, to be removed in the future.
16-
// GetDatasetForIntervalRequest contains the request parameters for retrieving data for a time interval.
17-
message GetDatasetForIntervalRequest {
18-
// The collection id.
19-
string collection_id = 1;
20-
21-
// Either time interval or datapoint interval must be set, but not both.
22-
// The time interval for which data is requested.
23-
tilebox.v1.TimeInterval time_interval = 2;
24-
// The datapoint interval for which data is requested.
25-
tilebox.v1.IDInterval datapoint_interval = 6;
26-
27-
// The pagination parameters for this request.
28-
LegacyPagination page = 3 [features.field_presence = EXPLICIT];
29-
// If true, the datapoint data is not returned.
30-
bool skip_data = 4;
31-
// If true, the datapoint metadata is not returned.
32-
// If both skip_data and skip_meta are true,
33-
// the response will only consist of a list of datapoint ids without any additional data or metadata.
34-
bool skip_meta = 5;
35-
}
36-
37-
// Legacy message, to be removed in the future.
38-
// GetDatapointByIdRequest contains the request parameters for retrieving a single data point in a collection by its id.
39-
message GetDatapointByIdRequest {
40-
// The collection id.
41-
string collection_id = 1;
42-
// The id of the requested data point.
43-
string id = 2;
44-
// If true, only the datapoint metadata is returned.
45-
bool skip_data = 3;
46-
}
47-
4815
// QueryByIDRequest contains the request parameters for retrieving a single data point by its id.
4916
message QueryByIDRequest {
5017
// 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.
@@ -135,11 +102,6 @@ message QueryResultPage {
135102

136103
// DataAccessService provides data access and querying capabilities for Tilebox datasets.
137104
service DataAccessService {
138-
// legacy endpoint, kept around for backwards compatibility with older python clients for now
139-
rpc GetDatasetForInterval(GetDatasetForIntervalRequest) returns (DatapointPage) {}
140-
// legacy endpoint, kept around for backwards compatibility with older python clients for now
141-
rpc GetDatapointByID(GetDatapointByIdRequest) returns (Datapoint) {}
142-
143105
// QueryByID returns a single data point by its ID.
144106
rpc QueryByID(QueryByIDRequest) returns (Any) {}
145107

0 commit comments

Comments
 (0)