Skip to content

Commit

Permalink
Missing search endpoints
Browse files Browse the repository at this point in the history
get groups of eperson
Updating metadata layout
  • Loading branch information
benbosman committed Sep 26, 2019
1 parent a3a4f4d commit a65a31d
Show file tree
Hide file tree
Showing 2 changed files with 164 additions and 72 deletions.
118 changes: 79 additions & 39 deletions epersongroups.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
"uuid": "617cf46b-535c-42d5-9d22-327ce2eff6dc",
"name": "Administrator",
"handle": null,
"metadata": [
{
"key": "dc.title",
"value": "Administrator",
"language": null
}
],
"metadata": {
"dc.title": [
{
"value": "Administrator",
"language": null,
"authority": "",
"confidence": -1,
"place": 0
}
]
},
"permanent": true,
"type": "group",
"_links": {
Expand Down Expand Up @@ -62,12 +66,16 @@ To create a new EPerson Group, perform a post with the JSON below to the eperson

```json
{
"metadata": [
{
"key": "dc.title",
"value": "New Group 1"
}
]
"metadata": {
"dc.title": [
{
"value": "New Group 1",
"language": null,
"authority": "",
"confidence": -1
}
]
}
}
```

Expand All @@ -94,13 +102,17 @@ Samples:
"uuid": "617cf46b-535c-42d5-9d22-327ce2eff6dc",
"name": "Administrator",
"handle": null,
"metadata": [
{
"key": "dc.title",
"value": "Administrator",
"language": null
}
],
"metadata": {
"dc.title": [
{
"value": "Administrator",
"language": null,
"authority": "",
"confidence": -1,
"place": 0
}
]
},
"permanent": true,
"type": "group",
"_links": {
Expand Down Expand Up @@ -227,27 +239,39 @@ Samples:
"uuid": "a6086b34-3918-45b7-8ddd-9329a702a26a",
"name": "atmirenv@gmail.com",
"handle": null,
"metadata": [
{
"key": "eperson.firstname",
"value": "Atmire",
"language": null
},
{
"key": "eperson.lastname",
"value": "NV",
"language": null
},
{
"key": "eperson.language",
"value": "en",
"language": null
}
],
"metadata": {
"eperson.firstname": [
{
"value": "John",
"language": null,
"authority": "",
"confidence": -1,
"place": 0
}
],
"eperson.language": [
{
"value": "en",
"language": null,
"authority": "",
"confidence": -1,
"place": 0
}
],
"eperson.lastname": [
{
"value": "Doe",
"language": null,
"authority": "",
"confidence": -1,
"place": 0
}
]
},
"netid": null,
"lastActive": "2018-12-19T11:06:43.404+0000",
"lastActive": "2019-09-25T15:59:28.000+0000",
"canLogIn": true,
"email": "atmirenv@gmail.com",
"email": "user@institution.edu",
"requireCertificate": false,
"selfRegistered": false,
"groups": null,
Expand Down Expand Up @@ -324,3 +348,19 @@ Return codes:
* 404 Not found - if the parent group doesn't exist
* 422 Unprocessable Entity - if the child group doesn't exist
* 422 Unprocessable Entity - if the specified eperson doesn't exist

## Search
**GET /api/eperson/groups/search/byMetadata?query=<:name>**

This supports a basic search in the metadata.
It will search in:
* UUID (exact match)
* group name

## Search
**GET /api/eperson/groups/search/byMetadata?query=<:name>**

This supports a basic search in the metadata.
It will search in:
* UUID (exact match)
* group name
118 changes: 85 additions & 33 deletions epersons.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,37 @@
"uuid": "028dcbb8-0da2-4122-a0ea-254be49ca107",
"name": "user@institution.edu",
"handle": null,
"metadata": [
{
"key": "eperson.firstname",
"value": "John",
"language": null
},
{
"key": "eperson.lastname",
"value": "Doe",
"language": null
},
{
"key": "eperson.phone",
"value": "",
"language": null
},
{
"key": "eperson.language",
"value": "en",
"language": null
}
],
"metadata": {
"eperson.firstname": [
{
"value": "John",
"language": null,
"authority": "",
"confidence": -1,
"place": 0
}
],
"eperson.language": [
{
"value": "en",
"language": null,
"authority": "",
"confidence": -1,
"place": 0
}
],
"eperson.lastname": [
{
"value": "Doe",
"language": null,
"authority": "",
"confidence": -1,
"place": 0
}
]
},
"netid": null,
"lastActive": null,
"lastActive": "2019-09-25T15:59:28.000+0000",
"canLogIn": true,
"email": "user@institution.edu",
"requireCertificate": false,
Expand All @@ -45,6 +52,9 @@
"_links": {
"self": {
"href": "https://dspace7.4science.it/dspace-spring-rest/api/eperson/epersons/028dcbb8-0da2-4122-a0ea-254be49ca107"
},
"groups": {
"href": "https://dspace7.4science.it/dspace-spring-rest/api/eperson/epersons/028dcbb8-0da2-4122-a0ea-254be49ca107/groups"
}
}
}
Expand Down Expand Up @@ -127,20 +137,62 @@ To create a new EPerson, perform a post with the JSON below to the epersons endp
```json
{
"name": "user@institution.edu",
"metadata": [
{
"key": "eperson.firstname",
"value": "John"
},
{
"key": "eperson.lastname",
"value": "Doe"
}
],
"metadata": {
"eperson.firstname": [
{
"value": "John",
"language": null,
"authority": "",
"confidence": -1,
}
],
"eperson.lastname": [
{
"value": "Doe",
"language": null,
"authority": "",
"confidence": -1,
}
]
},
"canLogIn": true,
"email": "user@institution.edu",
"requireCertificate": false,
"selfRegistered": true,
"type": "eperson"
}
```

## Linked entities
### Groups
**GET /api/eperson/epersons/<:uuid>/groups**

A HAL link to retrieve the eperson groups of an eperson is included.
This will return a pageable list of the groups this person is a direct member of

## Search
**GET /api/eperson/epersons/search/byMetadata?query=<:name>**

This supports a basic search in the metadata.
It will search in:
* UUID (exact match)
* first name
* last name
* email address

## Linked entities
### Groups
**GET /api/eperson/epersons/<:uuid>/groups**

A HAL link to retrieve the eperson groups of an eperson is included.
This will return a pageable list of the groups this person is a direct member of

## Search
**GET /api/eperson/epersons/search/byMetadata?query=<:name>**

This supports a basic search in the metadata.
It will search in:
* UUID (exact match)
* first name
* last name
* email address

0 comments on commit a65a31d

Please sign in to comment.