Added initial documentation of the JSON API

Please discuss on this proposal.