(Web API) Add dynamic pre & post processing of input/output data for API calls

Registered by Carl Leitner on 2016-07-21

API endpoints should have an option to pre and post process data using a dynamically executable script. At a minimum scripts could be either .json (executed via the already embedded nashorn javascript interpreter) or .xsl (executed via the already embedded saxon XSL processor). Input variable, from HTTP POST or GET requests, should be bound to a variable in the execution context of the interpreters. Would need a way to limit run-time of interpreters and a way to allow administrators to upload or scp new versions of scripts to be run.

This is needed for FHIR support, but the idea is to add the needed functionality in a way that could be useful outside of FHIR.

UPDATE (8/30/2016): Functionality is available here:
    https://code.launchpad.net/~litlfred/dhis2/script-library
and documented here:
   https://docs.google.com/document/d/1WIyttIJLWwthUM7L9XjlfkM7jdD4SMugr5ur4BzDW2I/edit#

Blueprint information

Status:
Started
Approver:
None
Priority:
Undefined
Drafter:
Carl Leitner
Direction:
Needs approval
Assignee:
Carl Leitner
Definition:
Pending Approval
Series goal:
None
Implementation:
Needs Code Review
Milestone target:
None
Started by
Carl Leitner on 2016-08-30

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.