Class Resources
- java.lang.Object
-
- nzilbb.labbcat.server.api.APIRequestHandler
-
- nzilbb.labbcat.server.api.TableServletBase
-
- nzilbb.labbcat.server.api.admin.elicit.Resources
-
@RequiredRole("admin") public class Resources extends TableServletBase
/api/admin/elicit/resources/task_id[/resource_id] : Administration of elicitation task localization resources.Allows administration (Read/Update/Delete) of participant-facing elicitation task memessages via JSON-encoded objects with the following attributes:
- task_id
- The database key for the elicitation task.
- resource_id
- The database key for the resource (message).
- help
- A description of the message to help administrators/translators understand the purpose of the resource.
- message
- The participant-facing message.
The following operations, specified by the HTTP method, are supported:
- GET
- Read the records.
- Request Path - /api/admin/resources/task_id where task_id identifies the task of the messages.
- 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_name 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.
- 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 Resources()
-
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
-
-