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

book

Article ID: 167412

calendar_today

Updated On:

Products

Reporter

Issue/Introduction

Error message:

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

Resolution

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.

 https://127.0.0.1:8082/api/cancel?username=admin&password=admin&reportId=2