Creating a JSON API

You can start with a simple google search.
=> https://github.com/fguillot/JsonRPC (or others)