Issue
When calling K2 workflow api:
https://k2.denallix.com/api/workflow/v1/workflows/xx
The following error is thrown:
"Maximum request length exceeded." or "An error has occurred."

Error Code

or

Resolution
The default MaxRequestLength set in IIS for workflow api site is 2 MB. You can add the following key in the <system.web> section in the web.config file to increase the size.
<httpRuntime maxRequestLength="16384" targetFramework="4.6.1" />
The web.config file is located in the following folder:
C:Program Files (x86)K2 blackpearlWebServicesAPIWorkflowV1
Please make a backup copy of the file before making changes.
Increasing this limit could potentially raise performance issues if the server does not have enough resources to process the request.