A django dependent package that exposes API to allow you to run any management commands via API
You can specify the authorization class in settings
Commands to be exposed is determined from a whitelist. To add commands to the whitelist, please specify them in the following variable in settings:
MANAGEMENT_API_EXPOSED_COMMANDS = (
'syncdb',
'migrate'
)
Add the following URL path to your project
url(r'^management_api/', include('management_api.urls')),
Access your list of management commands via:
/management_api/v1/commands/?format=json
/management_api/v1/commands/syncdb/?format=json
Make a POST request to:
/management_api/v1/commands/?format=json
With the following data:
{
command: 'migrate',
args: [
'tastypie',
'--fake'
],
kwargs: {}
}