Lists the user's notifications from the last two weeks, newest first.
Request
GET https://www.activityinfo.org/resources/notifications
Successful response
application/json
| object | |||
| notifications | array[object] | The notifications, newest first. | required |
| id | string | The notification's id, which encodes its type and the id of the object it reports on: a job notification has the id {@code job- |
required |
| type | string | The kind of event this notification reports. Values:
|
required |
| time | instant | The time this notification was last updated: the completion time of a finished job, or the start time of a pending job. Notifications are listed newest first by this time. | required |
| read | boolean | True if the user has already seen this notification. | required |
| expiryTime | instant | If this notification offers a downloadable file, the time after which the file is no longer available. | optional |
| job | object | The status of the job, for job notifications. | optional |
| id | string | The job's id | required |
| userId | string | The id of the user who started the job | required |
| descriptor | object | The job descriptor used to start this job | required |
| state | string | The job's current state Values:
|
required |
| jobResult | object | required | |
| percentComplete | float | required | |
| error | object | If the job state is FAILED, the reason for the failure. | optional |
| code | string | required | |
| message | string | required | |
| localizedMessage | string | required | |
| startTime | instant | The time at which the job was started, in milliseconds since the epoch. Zero for statuses that were recorded before start times were reported. | required |
| completionTime | instant | The time at which the job completed or failed, in milliseconds since the epoch. Absent while the job is pending. | optional |
| read | boolean | True if the user has seen this job's outcome, for example by downloading its result or by marking its notification as read. | required |
Error responses
| Status Code | Error Code | Description |
|---|---|---|
| 401 | AUTHENTICATION_ |
The request must be authenticated |
Example
curl -u anything:YOUR_API_TOKEN \
https://www.activityinfo.org/resources/notifications