wazuh-dashboard-plugins icon indicating copy to clipboard operation
wazuh-dashboard-plugins copied to clipboard

API Console suggestions aren't complete

Open juliamagan opened this issue 2 years ago • 1 comments

Wazuh Elastic Rev Security
4.3 7.x 4301-1 Basic, ODFE, Xpack
Browser
Firefox

Description While testing the API Console tool in demo environments, we could see that some suggestions were incomplete.

Steps to reproduce

  1. Navigate to Tools>API Console
  2. Start writing a request (GET requests seem to work correctly, try PUT for example)
  3. Select a suggestion without extra parameters, for example, PUT /agents/group

Expected Result

  1. Suggestion with :group_id to indicate to the user that this parameter is required.

Actual Result

  1. Different suggestions:
  • Nothing -> the request won't work
  • :group_id-> correct
  • Repeated group -> if we complete the suggestion with a valid group id (for example PUT /agents/group/group/apache, we get:
{
"error": "3013",
"message": {
  "title": "Bad Request",
  "detail": "'group' is not a 'numbers'. Failed validating 'format' in schema: {'description': 'Agent ID', 'format': 'numbers', 'minLength': 3, 'type': 'string', 'x-scope': ['', '#/components/parameters/agent_id']}. On instance: 'group'"
}
}

Screenshots

https://user-images.githubusercontent.com/80041853/164182458-bc8effc6-fcdc-4899-855e-2ece7fda888e.mp4

https://user-images.githubusercontent.com/80041853/164182465-04368f77-3230-407a-9e24-8caaf58eda89.mp4

suggestion_put

juliamagan avatar Apr 20 '22 08:04 juliamagan

Changing the tag to enhancement as this is an improvement of the current functionality.

We'll improve these suggestions as soon as possible.

Thank you for the report.

AlexRuiz7 avatar Apr 20 '22 09:04 AlexRuiz7