1

Remote API exec_report

Тема: Remote API exec_report

Hi,

I am trying access exec_report through Remote API using the  standard parameters at http://sdk.wialon.com/wiki/en/local/rem … xec_report & http://sdk.wialon.com/wiki/en/local/rem … es/reports

but I got {"error":4} while I followed all the steps through it using the PHP class and tried the java script url but I got the same error .. Known that I faced the same problem with core/search_items and obviously it happen when the function uses nested array because anything but this works fine

this an example of my code in PHP

$wialon_api->report_exec_report('{
                "reportResourceId":512156,
                "reportTemplateId":41,
                "reportObjectId":931510,
                "reportObjectSecId":0,
                "interval":{
                    "from":1450501520,
                    "to":1450687920,
                    "flags":0x00
                    }
                }');

Could you please tell me where is the error and if there is ready online working example I can use to figure out my problem can I get it because all your examples with demo account didn't work

2

Remote API exec_report

Re: Remote API exec_report

Hello

We're not recommend to use spaces in params.

Here's better approach (tested with php-wialon master branch)

$params = array(
    reportResourceId=>515,
    reportTemplateId=>1,
    reportObjectId=>520,
    reportObjectSecId=>0,
    interval=>array(
        from=>1450501520,
        to=>1450687920,
        flags=>0x00
    )
);
echo $wialon_api->report_exec_report(json_encode($params));

Hope this helps