1. A system comprising: (a) a client device displaying a series of screens output from a legacy program in a terminal emulator; (b) a tracking module logging activity in said terminal emulator in a trail file; and (c) an analytic module adapted to analyze said trail file and produce, based on the analysis, a REST API that supports a collection of different REST API calls corresponding to the series of screens output from the legacy program, the REST API being a stateless API utilized in a stateful manner in which each REST API call of the collection of REST API calls provides direct access to a corresponding screen of the series of screens.