Class Reminders
- java.lang.Object
-
- nzilbb.labbcat.server.api.APIRequestHandler
-
- nzilbb.labbcat.server.api.TableServletBase
-
- nzilbb.labbcat.server.api.admin.elicit.Reminders
-
@RequiredRole("admin") public class Reminders extends TableServletBase
/api/admin/elicit/reminders/task_id[/reminder_id] : Administration of elicitation task reminder records for mobile app deployments.Allows administration (Create/Read/Update/Delete) of default task reminder records via JSON-encoded objects with the following attributes:
- task_id
- The database key for the elicitation task.
- reminder_id
- The database key for the reminder record.
- label
- The participant-facing name of the reminder.
- participant_pattern
- Regular expression that matches the participant ID of participants for whom these reminders will be set.
- reminder_day
- The day of the reminder, one of:
- daily : Daily
- 2 : Every other day
- 3 : Every third day
- 4 : Every fourth day
- 5 : Every fifth day
- 6 : Every sixth day
- weekly : Weekly
- monday : Monday
- tuesday : Tuesday
- wednesday : Wednesday
- thursday : Thursday
- friday : Friday
- saturday : Saturday
- sunday : Sunday 2-weekly : Fortnightly
- reminder_time
- Time of day of the reminder.
- from_day
- Reminders start this many days after they install the app.
- to_day
- Reminders end this many days after they install the app.
The following operations, specified by the HTTP method, are supported:
- POST
- Create a new record.
- Request Body - a JSON-encoded object representing the new record (excluding reminder_id).
- Response Body - the standard JSON envelope, with the model as an object representing the new record (including reminder_id).
- Response Status
- 200 : The record was successfully created.
- GET
-
Read the reminder records for the given task.
- Request Path - /api/admin/elicit/reminders/task_id where task_id is the task ID.
- Parameters
- pageNumber (integer) : The (zero-based) page to return.
- pageLength (integer) : How many rows per page (default is 20).
- Accept (string) : Equivalent of the "Accept" request header (see below).
- "Accept" request header/parameter "text/csv" to return records as Comma Separated Values. If not specified, records are returned as a JSON-encoded array of objects.
- Response Body - the standard JSON envelope, with the model as a corresponding list of records.
- Response Status
- 200 : The records could be listed.
- PUT
- Update an existing record, specified by the
task_id and reminder_id given in the request body.
- Request Body - a JSON-encoded object representing the record.
- Response Body - the standard JSON envelope, with the model as an object representing the record.
- Response Status
- 200 : The record was successfully updated.
- 404 : The record was not found.
- DELETE
- Delete an existing record.
- Request Path - /api/admin/elicit/reminders/task_id[/reminder_id] where task_id is the task ID and reminder_id is the ID of the reminder to delete.
- Response Body - the standard JSON envelope, including a message if the request succeeds or an error explaining the reason for failure.
- Response Status
- 200 : The record was successfully deleted.
- 400 : No reminder_id was specified in the URL path, or the record exists but could not be deleted.
- 404 : The record was not found.
- Author:
- Robert Fromont robert@fromont.net.nz
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class nzilbb.labbcat.server.api.TableServletBase
TableServletBase.DeleteCheck
-
-
Field Summary
-
Fields inherited from class nzilbb.labbcat.server.api.APIRequestHandler
SC_BAD_REQUEST, SC_CONFLICT, SC_CREATED, SC_FORBIDDEN, SC_INTERNAL_SERVER_ERROR, SC_METHOD_NOT_ALLOWED, SC_NOT_FOUND, SC_OK, SC_UNAUTHORIZED, SC_UNPROCESSABLE_CONTENT, SC_UNSUPPORTED_MEDIA_TYPE
-
-
Constructor Summary
Constructors Constructor Description Reminders()
-
Method Summary
-
Methods inherited from class nzilbb.labbcat.server.api.TableServletBase
delete, get, post, put
-
Methods inherited from class nzilbb.labbcat.server.api.APIRequestHandler
getContext, GetSystemAttribute, init, writeResponse
-
-