From 29ad374498e650fa9b2177f1f1db9adb845c05fb Mon Sep 17 00:00:00 2001 From: benbosman Date: Tue, 18 Dec 2018 16:34:55 +0100 Subject: [PATCH] Creating REST contract --- epersongroups.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 epersongroups.md diff --git a/epersongroups.md b/epersongroups.md new file mode 100644 index 00000000..90d9b6bd --- /dev/null +++ b/epersongroups.md @@ -0,0 +1,70 @@ +# EPerson groups Endpoints +[Back to the list of all defined endpoints](endpoints.md) + +## Main Endpoint +**GET /api/eperson/groups** + +## Single EPerson Group +**GET /api/eperson/groups/<:uuid>** + +```json +{ + "id": "617cf46b-535c-42d5-9d22-327ce2eff6dc", + "uuid": "617cf46b-535c-42d5-9d22-327ce2eff6dc", + "name": "Administrator", + "handle": null, + "metadata": [ + { + "key": "dc.title", + "value": "Administrator", + "language": null + } + ], + "permanent": true, + "type": "group", + "_links": { + "groups": { + "href": "https://dspace7-internal.atmire.com/rest/api/eperson/groups/617cf46b-535c-42d5-9d22-327ce2eff6dc/groups" + }, + "self": { + "href": "https://dspace7-internal.atmire.com/rest/api/eperson/groups/617cf46b-535c-42d5-9d22-327ce2eff6dc" + } + }, + "_embedded": { + "groups": { + "_embedded": { + "groups": [] + }, + "_links": { + "self": { + "href": "https://dspace7-internal.atmire.com/rest/api/eperson/groups/617cf46b-535c-42d5-9d22-327ce2eff6dc/groups" + } + }, + "page": { + "number": 0, + "size": 0, + "totalPages": 1, + "totalElements": 0 + } + } + } +} +``` + +## Create new EPerson Group + +**POST /api/eperson/groups** + +To create a new EPerson Group, perform a post with the JSON below to the epersons endpoint when logged in as admin. + +```json +{ + "name": "Administrator", + "metadata": [ + { + "key": "dc.title", + "value": "Administrator" + } + ] +} +```