Comment to 'Looking for more information on API module'
  • To add custom API endpoint to UNA, please create an empty module first, I think it's better to rename modules/boonex/api module to your own and delete or replace existing endpoints with yours. 

    To add custom endpoint - add service function, for example to add endpoint which get time you can add something like this:

    public function serviceClock() 
    {
        return ['time' => date('H:i:s')];
    }

    Then declare if you want to use this endpoint with authentication or not, for public endpoint add name of the endpoint to serviceGetPublicServices method:

    public function serviceGetPublicServices()
    {
        $a = parent::serviceGetPublicServices();
        return array_merge($a, array ('Clock' => ''));
    }

    for protected endpoint add it the same way but to serviceGetSafeServices method.

    After above you will be able to call your custom endpoint with the following URL:

    http://example.com/m/oauth2/com/clock?client_id=1234abcd&module=your_modulename

    You will get response in JSON format