User Reports in Infoplus may be ran through the Infoplus API via a GET to the appropriate endpoint.


To use this API call, you must use a version of the API greater than 2.0.


Steps for Producing a User Report


  1. First find the id of the report you want to run.  Do this by navigating to the "Manage User Reports" page in Infoplus and noting the value in the id column.

    Note: For more information about creating User Reports in Infoplus, please see our Create / Manage User Reports article. 

  2. Create a GET request to the runReport endpoint.
  3. Add the query parameter of format.
  4. Send the request.


Here's an example of a GET request to the runReport endpoint for report id 1 with a format of XML.


GET https://[subdomain].infopluswms.com/infoplus-wms/api/beta/report/1/runReport?format=XML


Here's an example of the same GET request being ran directly from your command line using curl


curl -s -H API-Key:[user api key] https://[subdomain].infopluswms.com/infoplus-wms/api/beta/report/1/runReport?format=CSV


If successful, a 200 OK status code is returned along with the file data in the body of the response:


HTTP/1.1 200 OK
Connection: close
Content-Type: application/xml
Content-Length: 2767
Date: Thu, 21 Feb 2019 17:35:17 GMT
 
[XML_DATA]


If the format parameter is missing or the user report id doesn't exist, a 400 Bad Request status code is returned along with an error message:


HTTP/1.1 400 Bad Request
Content-Type: application/json
Date: Mon, 25 Feb 2019 15:03:46 GMT
Content-Length: 54
Connection: Close

{"errors":["Format must be csv, json, pdf, xlsx, or xml."]}


HTTP/1.1 400 Bad Request
Content-Type: application/json
Date: Wed, 27 Feb 2019 19:38:08 GMT
Content-Length: 45
Connection: Close

{"errors":["No report found with id of 27."]}