REST interface for the social networking library (notifications).
| 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: ...
{
"recipient" : "andrea.rossi",
"job_id" : "...",
"job_name" : "...",
"service_name" : "...",
"status" : "DELETED",
"status_message" : "...",
"runningJob" : {
"jobId" : "...",
"status" : "TIMED_OUT",
"jobName" : "...",
"serviceName" : "...",
"message" : "..."
}
}
HTTP/1.1 200 OK
Content-Type: application/json
...