REST interface for the social networking library (notifications).
Send a Catalogue notification to a given user
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| Content-Type | header | application/json |
| media type | data type |
|---|---|
| application/json | CatalogueEvent (JSON) |
| code | condition |
|---|---|
| 200 | Catalogue Notification is sent correctly |
| 500 | The error is reported into the 'message' field of the returned object |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) |
POST /2/notifications/catalogue
Content-Type: application/json
Accept: application/json
Authorization: ...
{
"idsToNotify" : [ "...", "..." ],
"notifyText" : "...",
"itemURL" : "...",
"itemId" : "...",
"type" : "ITEM_SUBMITTED",
"idsAsGroup" : true
}
HTTP/1.1 200 OK
Content-Type: application/json
...
| name | type | description | default | constraints |
|---|---|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources | ||
| Content-Type | header | application/json | ||
| from | query | 1 | min: 1 | |
| quantity | query | 10 | min: 0 |
| code | condition |
|---|---|
| 200 | Notifications retrieved and reported in the 'result' field of the returned object |
| 500 | The error is reported into the 'message' field of the returned object |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) |
GET /2/notifications/get-range-notifications
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Send a JOB notification to a given recipient
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| Content-Type | header | application/json |
| media type | data type | description |
|---|---|---|
| application/json | JobNotificationBean (JSON) | The job bean |
| code | condition |
|---|---|
| 200 | Notification is sent correctly |
| 500 | The error is reported into the 'message' field of the returned object |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) |
POST /2/notifications/notify-job-status
Content-Type: application/json
Accept: application/json
Authorization: ...
{
"status" : "SUBMITTED",
"recipient" : "...",
"job_id" : "...",
"status_message" : "...",
"job_name" : "...",
"service_name" : "..."
}
HTTP/1.1 200 OK
Content-Type: application/json
...
Send a Workspace notification to a given user
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| Content-Type | header | application/json |
| media type | data type |
|---|---|
| application/json | WorkspaceEvent (JSON) |
| code | condition |
|---|---|
| 200 | Workspace Notification is sent correctly |
| 500 | The error is reported into the 'message' field of the returned object |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) |
POST /2/notifications/workspace
Content-Type: application/json
Accept: application/json
Authorization: ...
{
"type" : "...",
"idsAsGroup" : true,
"idsToNotify" : [ "...", "..." ]
}
HTTP/1.1 200 OK
Content-Type: application/json
...