I have a Django web application, which allows users to do stop/start/install_pkg on a remote server over HTTP from UI. Django web app has start / stop / install_pkg functions already implemented which basically creates the appropriate URL and calls the HTTP url with params.
My goal is to use the same internal functions when user does a REST call like the following:
1. https://api/v1/server/<server_name>/start/?api_key=<api_key>¶ms=<params>
2. https://api/v1/server/<server_name>/stop/?api_key=<api_key>¶ms=<params>
3. https://api/v1/server/<server_name>/install_pkg/?api_key=<api_key>¶ms=<params>
And return JSON response to the caller containing remote server response object.
So far I have used Tastypie library to expose read-only access to model data of the Django web app over REST.
Tastypie tutorial on Non ORM resource shows how to interact with non ORM resources by overriding 9 methods of Tastypie. But given my limited knowledge and understanding I am unclear about how to use Tastypie for my case. Am I missing anything here?
EDITED: (29 Oct 2012)
To clarify further - Django web app has ORM entry for each of the remote servers in but this information is static info about a particular remote server like (name, ip, domain, ...) since it is created at the time of registering the remote server to Django web app.
The web service call from the Django web app to the remote server fetches the most current state of the remote server like (app_state, pkg_installed_list, ...) and this data is not getting stored anywhere in my Djnago web app. It is rendered as it is in UI.
Thus a GET on Django web app about the remote server essentially returns the static info.
Thanks,