Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] "similarity" parameter of GET /api/alert/<ID> doesnt work #2007

Closed
Zeecka opened this issue Apr 28, 2021 · 1 comment
Closed

[Bug] "similarity" parameter of GET /api/alert/<ID> doesnt work #2007

Zeecka opened this issue Apr 28, 2021 · 1 comment
Labels
bug TheHive4 TheHive4 related issues

Comments

@Zeecka
Copy link

Zeecka commented Apr 28, 2021

Request Type

Bug

Work Environment

Question Answer
TheHive version / git hash 4.1.4-1 (docker image thehiveproject/thehive4:latest)
Package Type Docker
Index type Elasticsearch

Problem Description

similarity GET parameter of /api/alert/<ID> route is broken.
According to documentation, /api/alert/:alertId provides a parameter named similarity which can be set to 1 to fill the similarCases field of the output (ie. /api/alert/~20672?similarity=1). However, the server answer with a 404 error: {"type":"NotFoundError","message":"Alert not found"}. Note that the alert exist and the error disapear when similarity is set to 0 or not set.

2021-04-28_17-18_2
2021-04-28_17-18_1
2021-04-28_17-18

Steps to Reproduce

  1. Create 2 alerts with same artifacts
  2. Transform one of the alert to a Case
  3. Query the API with the id of the other alert: /api/alert/<ID>?similarity=1

Possible Solutions

Fix with the expected behavior

@Zeecka Zeecka added TheHive4 TheHive4 related issues bug labels Apr 28, 2021
@Zeecka Zeecka changed the title [Bug] "similarity" parameter of GET /alert/<ID> doesnt work [Bug] "similarity" parameter of GET /api/alert/<ID> doesnt work Apr 28, 2021
@Zeecka
Copy link
Author

Zeecka commented Apr 28, 2021

Duplicate of #1981

@Zeecka Zeecka closed this as completed Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

1 participant