demisto / demisto-py

Demisto Client for Python
Apache License 2.0
70 stars 41 forks source link

Function `get_stats_for_widget` is not properly implemented #82

Closed nb-pdragoi closed 1 year ago

nb-pdragoi commented 2 years ago

Describe the bug Accord to the docs from here, the function to get widget statistics should be pretty to call. However, it does not require any widget id, name, json or anything, which the api endpoint requires. After looking into the function implementation here, we can see that nothing is parsed into the body_params of the get_stats_for_widget_with_http_info function.

To Reproduce Steps to reproduce the behavior:

  1. Run the code from the example,
  2. See error
    Exception when calling DefaultApi->get_stats_for_widget: (400)
    Reason: Bad Request
    HTTP response body: {"id":"bad_request","status":400,"title":"Bad request","detail":"Request body is not well-formed. It must be JSON.","error":"EOF","encrypted":false,"multires":null}

Expected behavior Get the results from the widget.

Environment

Additional context Same issue is with the get_stats_for_dashboard function: no way to set the dashboard we want to make the request to.

pdragoi commented 4 months ago

Was this fixed?