Differences

This shows you the differences between two versions of the page.

Link to this comparison view

custom_reports_api [2014/06/25 16:56]
ybarajas created
custom_reports_api [2014/06/25 17:02] (current)
ybarajas [Examples]
Line 1: Line 1:
 +======Reports REST Interface======
  
 +<note important>​This call requires cookies from a Login API call. Please refer  to the [[:​api_login|How to Log In]] help page for more information.</​note>​
 +
 +======Download Custom Reports======
 +
 +==Resource URL==
 +
 +<​code>​
 +
 +/​moservices/​rest/​api/​ipass/​{COMPANY_ID}/​mo/​reports/​monthly/​custom?​month={MONTH}?​User-Agent=apiuser&​filename={FILENAME}
 +
 +</​code>​
 +
 +==HTTP GET==
 +Return the custom report in a file.
 +
 +==GET Parameters==
 +Required parameters:
 +
 +^ Parameter ^ Description ^
 +|COMPANY_ID|N/​A|
 +|MONTH|**Format:​** YYYY-MM|
 +|FILENAME|N/​A|
 +|User-Agent| This helps us route your API call appropriately. **Default:​** //​apiuser//​|
 +
 +=====Examples=====
 +
 +Download the zip file containing the ClientUserVersion reports for Acme Company (with Company ID 987654) and also for all its child companies for the month of Feb of 2014.
 +
 +
 +==cURL:==
 +
 +<​code>​
 +
 +curl -k -X GET -b tmpCookies.txt -o "​$FILENAME.zip"​ "​https://​openmobile.ipass.com/​moservices/​rest/​api/​ipass/​$COMPANY/​mo/​reports/​monthly/​custom?​month=$MONTH&​filename=$FILENAME&​User-Agent=apiuser"​
 +
 +</​code>​
 +
 +==JAVA:==
 +
 +<​code>​
 +
 +     // Prepare the Custom Report API call to download ClientUserVersion Reports for ALL child companies (in ZIP)
 +          String reportURI = 
 +"/​moservices/​rest/​api/​ipass/​987654/​mo/​reports/​monthly/​custom?​User-Agent=apiuser&​month=2014-02&​filename=ClientUserVersionReport.html";​
 + HttpGet reportGet = new HttpGet("​https://​openmobile.ipass.com"​ + reportURI);
 +
 +    // Make the Custom Report API call to obtain the ClientUserVersion Reports for ALL child companies (in ZIP)
 + HttpResponse reportGetResponse = httpClient.execute(reportGet);​
 + HttpEntity httpEntity = reportGetResponse.getEntity();​
 +
 +
 +</​code>​
 +
 +
 +Go to: **[[:​api_documentation|REST API Overview]] > [[:​reports_rest|Introduction]]**
 

©2015 iPass Inc. All rights reserved. Terms of Use