A REST API built with the WebDev module is probably your best bet.
Here are some topics that might be helpful: