From 6da765029b55b540bb3f7469a86b116ef4e7e642 Mon Sep 17 00:00:00 2001 From: Toni Prieto Date: Mon, 1 Dec 2025 16:24:50 +0100 Subject: [PATCH] Add new search operations to retrieve a list of DSOs based on specific permissions (cherry picked from commit ed6f4195098a9513563a77fcc900908c64d24ba2) --- collections.md | 17 ++++++++++++++++- communities.md | 30 ++++++++++++++++++++++++++++++ items.md | 16 ++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/collections.md b/collections.md index e6ab059d..3d28b47a 100644 --- a/collections.md +++ b/collections.md @@ -158,7 +158,7 @@ Return codes: The supported parameters are: * page, size [see pagination](README.md#Pagination) * uuid: mandatory, the uuid of the community -* entityType: mandatory, the label of the entity type field the collection must have +* entityType: mandatory, the label of the entity type field the collection must have It returns the list of collections where the current user is authorized to submit and deal with the request entity type @@ -187,6 +187,21 @@ Return codes: * 200 OK - if the operation succeeds * 401 Unauthorized - if you are not authenticated +#### findEditAuthorized +**/api/core/collections/search/findEditAuthorized** + +Get the list of all collections the current user is authorized to edit. + +The supported parameters are: +* `query`: limit the returned collections to those with metadata values matching the query terms. + The query is also used to build a prefix query. It can be used to implement + an autosuggest feature over the collection name +* `page`, `size` [see pagination](README.md#Pagination) + +Return codes: +* 200 OK - if the operation succeeds +* 401 Unauthorized - if you are not authenticated + ## Patch operations Collection metadata can be modified as described in [Modifying metadata via Patch](metadata-patch.md). diff --git a/communities.md b/communities.md index 63006151..df91c7ab 100644 --- a/communities.md +++ b/communities.md @@ -299,6 +299,36 @@ Return codes: * 200 OK - if the operation succeeds * 401 Unauthorized - if you are not authenticated +#### findEditAuthorized +**/api/core/communities/search/findEditAuthorized** + +Get the list of all communities the current user is authorized to edit. + +The supported parameters are: +* `query`: limit the returned communities to those with metadata values matching the query terms. + The query is also used to build a prefix query. It can be used to implement + an autosuggest feature over the community name +* `page`, `size` [see pagination](README.md#Pagination) + +Return codes: +* 200 OK - if the operation succeeds +* 401 Unauthorized - if you are not authenticated + +#### findAddAuthorized +**/api/core/communities/search/findAddAuthorized** + +Get the list of all communities the current user is authorized to add collections or communities to. + +The supported parameters are: +* `query`: limit the returned communities to those with metadata values matching the query terms. + The query is also used to build a prefix query. It can be used to implement + an autosuggest feature over the community name +* `page`, `size` [see pagination](README.md#Pagination) + +Return codes: +* 200 OK - if the operation succeeds +* 401 Unauthorized - if you are not authenticated + ## Creating communities ### Creating top level community diff --git a/items.md b/items.md index 044aa4b5..5405b0b5 100644 --- a/items.md +++ b/items.md @@ -581,3 +581,19 @@ Return codes: * 401 Unauthorized - if you are not authenticated * 403 Forbidden - if you are not logged in with sufficient permissions * 404 Not found - if the item doesn't exist (or was already deleted) + +## Search methods +#### findEditAuthorized +**GET /api/core/items/search/findEditAuthorized** + +It returns the list of Items that the current user is authorized to edit + +The supported parameters are: +* `query`: limit the returned Items to those with metadata values matching the query terms. + The query is also used to build a prefix query. It can be used to implement + an autosuggest feature over the collection name +* `page`, `size` [see pagination](README.md#Pagination) + +Return codes: +* 200 OK - if the operation succeeds +* 401 Unauthorized - if you are not authenticated