diff --git a/authorities.md b/authorities.md index 3657e322..a040c28b 100644 --- a/authorities.md +++ b/authorities.md @@ -19,13 +19,13 @@ Example: "type": "authority", "_links": { "entryValues": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/srsc/entryValues" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/srsc/entryValues" }, "entries": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/srsc/entries" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/srsc/entries" }, "self": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/srsc" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/srsc" } } }, @@ -37,13 +37,13 @@ Example: "type": "authority", "_links": { "entryValues": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_types/entryValues" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types/entryValues" }, "entries": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_types/entries" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types/entries" }, "self": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_types" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types" } } }, @@ -55,13 +55,13 @@ Example: "type": "authority", "_links": { "entryValues": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_iso_languages/entryValues" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_iso_languages/entryValues" }, "entries": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_iso_languages/entries" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_iso_languages/entries" }, "self": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_iso_languages" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_iso_languages" } } } @@ -69,7 +69,7 @@ Example: }, "_links": { "self": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities" } }, "page": { @@ -126,36 +126,51 @@ sample for an authority /server/api/integration/authorities/common_types/entries "display": "Dataset", "value": "Dataset", "otherInformation": {}, - "type": "authority" + "type": "authority", + "_links": { + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types/entryValues/Dataset" + } + } }, { "id": "Image, 3-D", "display": "Image, 3-D", "value": "Image, 3-D", "otherInformation": {}, - "type": "authority" + "type": "authority", + "_links": { + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types/entryValues/Image%2C%203-D" + } + } }, { "id": "Book", "display": "Book", "value": "Book", "otherInformation": {}, - "type": "authority" + "type": "authority", + "_links": { + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types/entryValues/Book" + } + } } ] }, "_links": { "first": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_types/entries?metadata=dc.type&query=Book&page=0&size=2" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types/entries?metadata=dc.type&query=Book&page=0&size=2" }, "self": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_types/entries?metadata=dc.type&query=Book&size=2" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types/entries?metadata=dc.type&query=Book&size=2" }, "next": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_types/entries?metadata=dc.type&query=Book&page=1&size=2" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types/entries?metadata=dc.type&query=Book&page=1&size=2" }, "last": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_types/entries?metadata=dc.type&query=Book&page=10&size=2" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types/entries?metadata=dc.type&query=Book&page=10&size=2" } }, "page": { @@ -182,8 +197,11 @@ sample for a hierarchical authority (srsc): /server/api/integration/authorities }, "type": "authority", "_links": { - "https://dspace7-internal.atmire.com/server/api/integration/authorities/srsc/entryValues/SCB1314": { - "href": "parent" + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/srsc/entryValues/VR131402" + }, + "parent": { + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/srsc/entryValues/SCB1314" } } }, @@ -194,13 +212,18 @@ sample for a hierarchical authority (srsc): /server/api/integration/authorities "otherInformation": { "note": "Ämneskategorier för vetenskapliga publikationer" }, - "type": "authority" + "type": "authority", + "_links": { + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/srsc/entryValues/ResearchSubjectCategories" + } + } } ] }, "_links": { "self": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/srsc/entries?metadata=dc.subject&query=Research&size=2" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/srsc/entries?metadata=dc.subject&query=Research&size=2" } }, "page": { @@ -233,7 +256,7 @@ sample for an authority /server/api/integration/authorities/common_types/entryVa }, "_links": { "self": { - "href": "https://dspace7-internal.atmire.com/server/api/integration/authorities/common_types/entryValues" + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/common_types/entryValues" } }, "page": { diff --git a/external-authority-sources.md b/external-authority-sources.md new file mode 100644 index 00000000..896a8ca2 --- /dev/null +++ b/external-authority-sources.md @@ -0,0 +1,275 @@ +# External sources Endpoints +[Back to the list of all defined endpoints](endpoints.md) + +## Main Endpoint +**/api/integration/externalsources** + +Provide access to the configured external sources. It returns the list of existent external sources. + +Example: +```json +{ + "_embedded": { + "externalsources": [ + { + "id": "orcid", + "name": "orcid", + "hierarchical": false, + "type": "externalsource", + "_links": { + "entries": { + "href": "https://dspace7.4science.cloud/server/api/integration/externalsources/orcid/entries" + }, + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/externalsources/orcid" + } + } + }, + { + "id": "ciencia", + "name": "ciencia", + "hierarchical": false, + "type": "externalsource", + "_links": { + "entries": { + "href": "https://dspace7.4science.cloud/server/api/integration/externalsources/ciencia/entries" + }, + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/externalsources/ciencia" + } + } + }, + { + "id": "my_staff_db", + "name": "my_staff_db", + "hierarchical": false, + "type": "externalsource", + "_links": { + "entries": { + "href": "https://dspace7.4science.cloud/server/api/integration/externalsources/my_staff_db/entries" + }, + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/externalsources/my_staff_db" + } + } + } + ] + }, + "_links": { + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/externalsources" + } + }, + "page": { + "size": 20, + "totalElements": 3, + "totalPages": 1, + "number": 0 + } +} +``` + +## Single Authority +**/api/integration/externalsources/<:source-name>** + +Provide detailed information about a specific external source. The JSON response document is as follow +```json +{ + "id": "orcid", + "name": "orcid", + "hierarchical": false, + "type": "externalsource" +} +``` + +Exposed links: +* entries: the list of values managed by the external source + +## Linked entities +### external source entries +**/api/integration/externalsources/<:source-name>/entries** + +It returns the filtered entries managed by the externally, see below + +The supported parameters are: +* page, size [see pagination](README.md#Pagination) if supported by the external source +* query: the terms, keywords or prefix to search: mandatory +* parent: the key of the parent authority when searching in a hierarchical authority + +It returns the entries in the external source matching the query + +sample for an external source /server/api/integration/externalsources/orcid/entries?query=Smith&size=2 +```json +{ + "_embedded": { + "externalSourceEntries": [ + { + "id": "0000-0002-4271-0436", + "display": "Smith, Dean", + "value": "Smith, Dean", + "metadata": { + "dc.identifier.orcid": [ + { + "value": "0000-0002-4271-0436", + "language": null, + "authority": null, + "confidence": -1, + "place": -1 + } + ], + "dc.identifier.uri": [ + { + "value": "https://orcid.org/0000-0002-4271-0436", + "language": null, + "authority": null, + "confidence": -1, + "place": -1 + } + ], + "person.familyName": [ + { + "value": "Smith", + "language": null, + "authority": null, + "confidence": -1, + "place": -1 + } + ], + "person.givenName": [ + { + "value": "Dean", + "language": null, + "authority": null, + "confidence": -1, + "place": -1 + } + ] + }, + "type": "externalSourceEntry", + "_links": { + "authority": { + "href": "https://dspace7.4science.cloud/server/api/integration/authorities/authors/entryValues/d4b5ca88-9d6d-4a87-b905-fef0f8cae26c" + }, + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/externalsources/orcid/entryValues/0000-0002-4271-0436" + } + } + }, + { + "id": "0000-0003-3681-2038", + "display": "Smith, Charles", + "value": "Smith, Charles", + "metadata": { + "dc.identifier.orcid": [ + { + "value": "0000-0003-3681-2038", + "language": null, + "authority": null, + "confidence": -1, + "place": -1 + } + ], + "dc.identifier.uri": [ + { + "value": "https://orcid.org/0000-0003-3681-2038", + "language": null, + "authority": null, + "confidence": -1, + "place": -1 + } + ], + "person.familyName": [ + { + "value": "Smith", + "language": null, + "authority": null, + "confidence": -1, + "place": -1 + } + ], + "person.givenName": [ + { + "value": "Charles", + "language": null, + "authority": null, + "confidence": -1, + "place": -1 + } + ] + }, + "type": "externalSourceEntry", + "_links": { + "entity": { + "href": "https://dspace7.4science.cloud/server/api/core/item/6fd90bf5-b84f-47b3-aaec-a55bde3a2a5a" + }, + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/externalsources/orcid/entryValues/0000-0003-3681-2038" + } + } + } + ] + } +} +``` + +### single entry +**GET /api/integration/externalsources/<:source-name>/entryValues/<:entry-id>** + +It returns the data from one entry in an external source + +sample for an external source /api/integration/externalsources/orcid/entryValues/0000-0002-4271-0436 +```json +{ + "id": "0000-0002-4271-0436", + "display": "Smith, Dean", + "value": "Smith, Dean", + "type": "externalSourceEntry", + "externalSource": "orcid", + "metadata": { + "dc.identifier.orcid": [ + { + "value": "0000-0002-4271-0436", + "language": null, + "authority": null, + "confidence": 0, + "place": -1 + } + ], + "dc.identifier.uri": [ + { + "value": "https://orcid.org/0000-0002-4271-0436", + "language": null, + "authority": null, + "confidence": 0, + "place": -1 + } + ], + "person.familyName": [ + { + "value": "Smith", + "language": null, + "authority": null, + "confidence": 0, + "place": -1 + } + ], + "person.givenName": [ + { + "value": "Dean", + "language": null, + "authority": null, + "confidence": 0, + "place": -1 + } + ] + }, + "_links": { + "entity": { + "href": "https://dspace7.4science.cloud/server/api/core/item/00167e74-c027-4984-8564-85c3fe513d45" + }, + "self": { + "href": "https://dspace7.4science.cloud/server/api/integration/externalsources/orcid/entryValues/0000-0002-4271-0436" + } + } +} +```