Why do I get the following error when searching via the Platform API?
Unhandled Exception: DocuWare.Services.Http.Client.HttpClientRequestException: 422 Unprocessable Entity (The requested search result count exceeds the system limit of 10000 per request. Please lower count value and use paging of results.)

A maximum of 10,000 results can be requested in a single search call via the Platform API. 

Search queries that are too large can put too much load on the cloud system. This can have a negative impact on your work processes.

To prevent this, search queries that are too large get rejected.

Please check our updated examples for executing a Query using a dialog expression.

The maximum value of the count parameter in the following calls is 10.000

  • /DocuWare/Platform/FileCabinets/{fileCabinetId}/Query/DialogExpression?dialogId={dialogId}&fields={fields}&sortOrder={sortOrder}&start={start}&count={count}
  • /DocuWare/Platform/FileCabinets/{fileCabinetId}/Query/FunctionExpression?fields={fields}&sortOrder={sortOrder}&start={start}&count={count}
  • /DocuWare/Platform/FileCabinets/{fileCabinetId}/Documents?q={q}&fields={fields}&sortOrder={sortOrder}&start={start}&msStart={msStart}&count={count}&format={format}&includeSuggestions={includeSuggestions}&csvDelimiter={csvDelimiter}&csvIsUtc={csvIsUtc}&calculateTotalCount={calculateTotalCount}
  • /DocuWare/Platform/FileCabinets/{fileCabinetId}/Query/Documents?q={q}&fields={fields}&sortOrder={sortOrder}&start={start}&count={count}&format={format}&additionalCabinets={additionalCabinets}&encodingName={encodingName}&csvDelimiter={csvDelimiter}&csvIsUtc={csvIsUtc}&includeSuggestions={includeSuggestions}&calculateTotalCount={calculateTotalCount}

If the count parameter exceeds the allowed value, you will receive the following response:

  • Status code: HTTP status code 422 (Unprocessable Entity)
  • Exception: SearchResultLimitExceededException

In this case, please adjust the count parameter to a valid value.

To continue to receive all documents, please use multiple continuous searches (paging). 
You can use the start parameter to control from which document of the total result set the delivery should start.

For examples, please check our  updated Postman collection.

Comments (1)
  • Just had a similar issue, the workflow history only reported "Reason: Unprocessable Entity!" however after running a test in the API, the HTML response below; Allowed me to remove required fields, and now it works. Hopefully this helps someone else, looking at the detail provided by the API can help troubleshooting.

      "Message": "Fill out the required field \"Order #\"",
      "Exception": "RequiredFieldException: Fill out the required field \"Order #\"",
      "Uri": "",
      "Method": "POST",
      "StatusCode": 422,
      "Status": "Unprocessable Entity",
      "InternalCode": 0