[op5-users] Ninja api
Per Åsberg
perasb at op5.com
Wed Aug 19 10:58:42 CEST 2009
Michael Hobbs skrev:
> Um one thing I cant see application/methods do you mean application/models?
That is correct, it should be application/models
> Also is it possible to call the api directly via the command line on the
> nagios server
>
> e.g could I do a get Host_Model/hostinfo?name=XX or something similar
>
> and get back the host data for host XX as a string
>
> or would I have to write a wrapper to call the data directly and return it
It is not possible to call the models directly. You should create a controller
(which you might call a wrapper if you like) which in turn uses the method(s)
in the model in question.
And yes, it is possible to use Ninja from the command line if you have
configured cli_access in config/config.php to allow this (i.e not false).
See install_scripts/auth_import.php for examples.
Hope this helps.
Regards,
/Per
---------------
Per Åsberg
Senior Developer
www.op5.com
More information about the op5-users
mailing list