When generating a report from using Reporter Web API, I received "HTTP 400 bad request" error.


Article ID: 167412


Updated On:




Error message:

httpStatusCode: 400
httpMessage: Bad Request
detailedMessage: Too many concurrent webapi reports.  Reporter restricts to 10 concurrent webapi reports.


To protect against rogue scripts requesting too many reports at any one time, the number of active reports running at any one time has a hard limit of ten (10). You can edit preferences.cfg file to change this value. However, this might affect report generation if the value is increased, as more memory is consumed by the active reports.

  } # explicit_proxy   webapi = {
    enabled = "true"
    requireHttps = "true"
    requireAdmin = "false"
    maxConcurrentReports = "10"
  } # webapi

At 45 minutes past each hour, Reporter releases all reports that have not been requested for 10 minutes or more.

To release the memory immediately after downloading the report, close the connection by using the /api/cancel operation. Although the command is cancel, it is really a close whereby it removes the report from the active report list and allows you to continue to generate new reports without waiting for ten minutes. If it is not closed with the /api/cancel operation, it closes automatically after ten minutes.

The following sample Web API cancels a report with the ID 2.