|
1 | 1 | # LDN Notify Services Endpoints
|
2 | 2 | [Back to the list of all defined endpoints](endpoints.md)
|
3 | 3 |
|
| 4 | +## Inbox Endpoint |
| 5 | +**/api/ldn/inbox** |
| 6 | + |
| 7 | +Active only if config ldn.enabled is true. This is the inbox of Notification json |
| 8 | +(see org.dspace.app.ldn.model.Notification model): when accepted an instance |
| 9 | +of LdnMessageEntity is created and stored. See documentation at: |
| 10 | +https://wiki.lyrasis.org/pages/viewpage.action?pageId=319815713 |
| 11 | +where json Notification examples are shared into a ready-to-use PostMan collection. |
| 12 | + |
| 13 | +```json |
| 14 | +{ |
| 15 | + "@context": [ |
| 16 | + "https://www.w3.org/ns/activitystreams", |
| 17 | + "https://purl.org/coar/notify" |
| 18 | + ], |
| 19 | + "actor": { |
| 20 | + "id": "https://research-organisation.org", |
| 21 | + "name": "Research Organisation", |
| 22 | + "type": "Organization" |
| 23 | + }, |
| 24 | + "context": { |
| 25 | + "id": "http://localhost:4000/handle/123456789/1119", |
| 26 | + "ietf:cite-as": "https://doi.org/10.5555/12345680", |
| 27 | + "type": "sorg:AboutPage", |
| 28 | + "url": { |
| 29 | + "id": "https://another-research-organisation.org/repository/datasets/item/201203421/data_archive.zip", |
| 30 | + "mediaType": "application/zip", |
| 31 | + "type": [ |
| 32 | + "Article", |
| 33 | + "sorg:Dataset" |
| 34 | + ] |
| 35 | + } |
| 36 | + }, |
| 37 | + "id": "urn:uuid:2f4ec582-109e-4952-a94a-b7d7615a8c69", |
| 38 | + "object": { |
| 39 | + "as:object": "newValue", |
| 40 | + "as:relationship": "somethingElse", |
| 41 | + "as:subject": "https://research-organisation.org/repository/item/201203/421/", |
| 42 | + "id": "http://localhost:4000/handle:123456789/1119", |
| 43 | + "type": "Relationship" |
| 44 | + }, |
| 45 | + "origin": { |
| 46 | + "id": "https://research-organisation.org/repository", |
| 47 | + "inbox": "2f4ec582-109e-4952-a94a-b7d7615a8c69", |
| 48 | + "type": "Service" |
| 49 | + }, |
| 50 | + "target": { |
| 51 | + "id": "https://another-research-organisation.org/repository", |
| 52 | + "inbox": "https://another-research-organisation.org/inbox/", |
| 53 | + "type": "Service" |
| 54 | + }, |
| 55 | + "type": [ |
| 56 | + "Announce", |
| 57 | + "coar-notify:RelationshipAction" |
| 58 | + ] |
| 59 | +} |
| 60 | +``` |
| 61 | +Return codes: |
| 62 | +* 200 OK - if the operation succeed, respose echoes the same id in the request |
| 63 | +* 422 Unprocessable Entity - if Error parsing request body |
| 64 | +* 500 Forbidden is not possible because it is restricted to authenticated users |
| 65 | + |
4 | 66 | ## Main Endpoint
|
5 | 67 | **/api/ldn/ldnservices**
|
6 | 68 |
|
|
0 commit comments