Skip to content

Commit 488ec36

Browse files
Add collection limit to ListCollections response (#32)
1 parent dc439f0 commit 488ec36

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

apis/datasets/v1/collections.proto

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,23 @@ message ListCollectionsRequest {
5252
bool with_count = 3;
5353
}
5454

55+
// ListCollectionsResponse is the response to ListCollectionsRequest.
56+
// It contains a list of collections for the requested dataset, as well as
57+
// some organization level metadata about the number of collections the organization owns
58+
// and the maximum number of collections it can own.
59+
message ListCollectionsResponse {
60+
// List of collections in the dataset.
61+
repeated CollectionInfo data = 1;
62+
// Number of collections in all datasets that the users organization is the owner of
63+
int64 owned_collections = 2;
64+
// Maximum number of collections that can be created and therefore owned by the organization. Nil means unlimited.
65+
int64 maximum_owned_collections = 3 [features.field_presence = EXPLICIT];
66+
}
67+
5568
// CollectionService is the service definition for the Tilebox datasets service, which provides access to datasets
5669
service CollectionService {
5770
rpc CreateCollection(CreateCollectionRequest) returns (CollectionInfo) {}
5871
rpc GetCollectionByName(GetCollectionByNameRequest) returns (CollectionInfo) {}
5972
rpc DeleteCollection(DeleteCollectionRequest) returns (DeleteCollectionResponse) {}
60-
rpc ListCollections(ListCollectionsRequest) returns (CollectionInfos) {}
73+
rpc ListCollections(ListCollectionsRequest) returns (ListCollectionsResponse) {}
6174
}

apis/datasets/v1/core.proto

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@ message CollectionInfo {
9999
uint64 count = 3 [features.field_presence = EXPLICIT];
100100
}
101101

102-
// CollectionInfos contains a list of CollectionInfo messages.
103-
message CollectionInfos {
104-
repeated CollectionInfo data = 1;
105-
}
106-
107102
// Dataset contains information about a single dataset
108103
message Dataset {
109104
// dataset id

0 commit comments

Comments
 (0)