API reference · Hubtask API 0.1.0
reminders
GET /items/{itemId}/reminders
List reminders
The entry's reminders, oldest first. Readable by whoever may read the entry, and unpaged: an entry carries at most max_reminders_per_item of them, which is the bound that makes a page unnecessary rather than an omission.
Path parameters
Responses
200The entry's reminders4XXAn error per RFC 9457 Problem
curl -X GET "$HUBTASK_URL/items/{itemId}/reminders" \ -H "Authorization: Bearer $HUBTASK_TOKEN" POST /items/{itemId}/reminders
Create reminder
Puts a reminder on the entry. offset_spec has two forms and no third: REL:<duration> is an ISO-8601 duration counted from the due date, so the entry needs one - without it there is no moment to fire at - and ABS:<instant> is a fixed moment no due date moves. A preset is a client's vocabulary for a common offset; what travels is the offset itself.
Path parameters
Headers
Request body application/json — ReminderInput
curl -X POST "$HUBTASK_URL/items/{itemId}/reminders" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "offset_spec": "REL:-PT1H", "channels": [ "EMAIL" ], "recipients": [ "018f6e2a-2b7c-7c1e-9b1a-3d5e6f7a8b9c" ]}' PATCH /items/{itemId}/reminders/{reminderId}
Update reminder
Changes a reminder. A merge patch: a field that is not sent is not touched, and each field that moves is its own change log entry, so two devices editing the offset and the channels converge to both. Recipients and channels are chosen whole - the list sent replaces the list stored.
Path parameters
Headers
Request body application/merge-patch+json — ReminderUpdate
curl -X PATCH "$HUBTASK_URL/items/{itemId}/reminders/{reminderId}" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H 'If-Match: "<the ETag you read>"' \ -H "Content-Type: application/merge-patch+json" \ -d '{ "offset_spec": "string", "channels": [ "EMAIL" ], "recipients": [ "018f6e2a-2b7c-7c1e-9b1a-3d5e6f7a8b9c" ]}' DELETE /items/{itemId}/reminders/{reminderId}
Delete reminder
Removes the reminder. A hard delete of one row: a reminder is created and deleted whole, and what a person deleted is gone rather than kept as a tombstone with a state - so a second deletion answers 404, the same answer any other missing sub-resource gives, rather than pretending to have removed something twice.
Path parameters
Headers
Responses
204Deleted4XXAn error per RFC 9457 Problem
curl -X DELETE "$HUBTASK_URL/items/{itemId}/reminders/{reminderId}" \ -H "Authorization: Bearer $HUBTASK_TOKEN" \ -H 'If-Match: "<the ETag you read>"'