From fd3c752a3f23cb687b26cdf926c8b16b456b5ede Mon Sep 17 00:00:00 2001 From: Lukas Bindreiter Date: Fri, 16 Jan 2026 10:53:58 +0100 Subject: [PATCH] Add collection limit to ListCollections response --- apis/datasets/v1/collections.proto | 15 ++++++++++++++- apis/datasets/v1/core.proto | 5 ----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/apis/datasets/v1/collections.proto b/apis/datasets/v1/collections.proto index 50a252a..eb986a7 100644 --- a/apis/datasets/v1/collections.proto +++ b/apis/datasets/v1/collections.proto @@ -52,10 +52,23 @@ message ListCollectionsRequest { bool with_count = 3; } +// ListCollectionsResponse is the response to ListCollectionsRequest. +// It contains a list of collections for the requested dataset, as well as +// some organization level metadata about the number of collections the organization owns +// and the maximum number of collections it can own. +message ListCollectionsResponse { + // List of collections in the dataset. + repeated CollectionInfo data = 1; + // Number of collections in all datasets that the users organization is the owner of + int64 owned_collections = 2; + // Maximum number of collections that can be created and therefore owned by the organization. Nil means unlimited. + int64 maximum_owned_collections = 3 [features.field_presence = EXPLICIT]; +} + // CollectionService is the service definition for the Tilebox datasets service, which provides access to datasets service CollectionService { rpc CreateCollection(CreateCollectionRequest) returns (CollectionInfo) {} rpc GetCollectionByName(GetCollectionByNameRequest) returns (CollectionInfo) {} rpc DeleteCollection(DeleteCollectionRequest) returns (DeleteCollectionResponse) {} - rpc ListCollections(ListCollectionsRequest) returns (CollectionInfos) {} + rpc ListCollections(ListCollectionsRequest) returns (ListCollectionsResponse) {} } diff --git a/apis/datasets/v1/core.proto b/apis/datasets/v1/core.proto index 9b58b0c..b67d49d 100644 --- a/apis/datasets/v1/core.proto +++ b/apis/datasets/v1/core.proto @@ -99,11 +99,6 @@ message CollectionInfo { uint64 count = 3 [features.field_presence = EXPLICIT]; } -// CollectionInfos contains a list of CollectionInfo messages. -message CollectionInfos { - repeated CollectionInfo data = 1; -} - // Dataset contains information about a single dataset message Dataset { // dataset id