Skip to content

Commit 95e5748

Browse files
authored
Merge pull request #241 from DSpace/search-nonmembers
Contract for `isNotMemberOf` searches for Groups and EPersons
2 parents e236933 + 3a1706a commit 95e5748

File tree

2 files changed

+54
-10
lines changed

2 files changed

+54
-10
lines changed

epersongroups.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,14 +327,40 @@ Return codes:
327327
* 404 Not found - if the parent group doesn't exist
328328
* 422 Unprocessable Entity - if the child group doesn't exist or if the specified eperson doesn't exist
329329

330-
## Search
331-
**GET /api/eperson/groups/search/byMetadata?query=<:name>**
330+
## Search Methods
332331

333-
This supports a basic search in the metadata.
332+
### byMetadata
333+
**GET /api/eperson/groups/search/byMetadata?query=<:string>**
334+
335+
This supports a basic search across all Groups via their metadata.
336+
It will search in:
337+
* UUID (exact match)
338+
* group name
339+
340+
It returns the list of GroupRest instances, if any, matching the user query
341+
342+
Return codes:
343+
* 200 OK - if the operation succeed
344+
* 400 Bad Request - if the 'query' parameter is missing or invalid
345+
* 401 Unauthorized - if you are not authenticated
346+
* 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators or Community/Collection administrators can use this endpoint.
347+
348+
### isNotMemberOf
349+
**GET /api/eperson/groups/search/isNotMemberOf?group=<:uuid>&query=<:string>**
350+
351+
This supports a basic search across all Groups which are not already a member (subgroup) of the provided Group (in the 'group' parameter). Therefore it searches across Groups _not already listed_ on the `/api/eperson/groups/<:uuid>/subgroups` endpoint for the provided group.
334352
It will search in:
335353
* UUID (exact match)
336354
* group name
337355

356+
It returns the list of GroupRest instances, if any, matching the user query
357+
358+
Return codes:
359+
* 200 OK - if the operation succeed
360+
* 400 Bad Request - if the 'group' or 'query' parameter is missing or invalid
361+
* 401 Unauthorized - if you are not authenticated
362+
* 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators or Community/Collection administrators can use this endpoint.
363+
338364
## Related DSpace Object of group
339365
**GET /api/eperson/groups/<:uuid>/object** (READ-ONLY)
340366

epersons.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
}
6161
```
6262

63-
### Search methods
64-
#### byEmail
63+
## Search methods
64+
### byEmail
6565
**/api/eperson/epersons/search/byEmail?email=<:string>**
6666

6767
The supported parameters are:
@@ -75,10 +75,10 @@ Return codes:
7575
* 401 Unauthorized - if you are not authenticated
7676
* 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators and users with READ rights on the target EPerson can use the endpoint
7777

78-
#### byMetadata
79-
**GET /api/eperson/epersons/search/byMetadata?query=<:name>**
78+
### byMetadata
79+
**GET /api/eperson/epersons/search/byMetadata?query=<:string>**
8080

81-
This supports a basic search in the metadata.
81+
This supports a basic search across all EPerson accounts via their metadata.
8282
It will search in:
8383
* UUID (exact match)
8484
* first name
@@ -89,9 +89,27 @@ It returns the list of EPersonRest instances, if any, matching the user query
8989

9090
Return codes:
9191
* 200 OK - if the operation succeed
92-
* 400 Bad Request - if the email parameter is missing or invalid
92+
* 400 Bad Request - if the 'query' parameter is missing or invalid
9393
* 401 Unauthorized - if you are not authenticated
94-
* 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators and users with READ rights on the target EPerson can use the endpoint
94+
* 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators or Community/Collection administrators can use this endpoint.
95+
96+
### isNotMemberOf
97+
**GET /api/eperson/epersons/search/isNotMemberOf?group=<:uuid>&query=<:string>**
98+
99+
This supports a basic search across all EPersons which are not already a member of the provided Group (in the 'group' parameter). Therefore it searches EPersons _not already listed_ on the `/api/eperson/groups/<:uuid>/epersons` endpoint for the provided group.
100+
It will search in:
101+
* UUID (exact match)
102+
* first name
103+
* last name
104+
* email address
105+
106+
It returns the list of EPersonRest instances, if any, matching the user query
107+
108+
Return codes:
109+
* 200 OK - if the operation succeed
110+
* 400 Bad Request - if the 'group' or 'query' parameter is missing or invalid
111+
* 401 Unauthorized - if you are not authenticated
112+
* 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators or Community/Collection administrators can use this endpoint.
95113

96114
## Patch operations
97115

0 commit comments

Comments
 (0)