Modules are made available to remote systems by means of an HTTP interface. There are two types of requests a client may send to the module: (a) a module descriptor request, and (b) a processing request.
A remote module is identified by a URL, which should be something like: http://www.example.com/mymodule; then the processing request is sent to that URL, and the descriptor request is sent to http://www.example.com/mymodule/meta.
If a client requests the module descriptor, the module should send a JSON object with the following variables:
The following is an example of a JSON module descriptor.
{"input":{"input":"text/plain"},"description":"Pipeline: alpino-kaf","output":{"output":"application/x-kaf-l1"}}
A processing request is sent as an HTTP POST request. If the module requires input, the data are sent as an HTTP file upload. More information on handling file uploads using a third-party webserver:
The module sends an HTTP response with status code OK (200) on success or an error code if the processing did not complete successfully.
See also: