-
Notifications
You must be signed in to change notification settings - Fork 639
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
Adding new observables to an alert retrospectively is impossible #511
Comments
Hello, thanks for raising this, we will take a look on it ;) |
Can you provide a curl example of this patch query? |
Sure. I've updated the "Steps to Reproduce" section with an example. |
Did you have time to have a look yet? It would help me a great deal if this issue gets fixed. |
Hi @rolinh I've just called the exact same example you posted on "Steps to Reproduce" section, and it works just fine. What TheHive version do you have? |
Hi @nadouani, One has to keep in mind though that the list of artifacts of the alert gets completely replaced by the list of provided artifacts (ie: the artifacts list is not appended but replaced when issuing an HTTP PATCH request). |
Yes exactly, I think that we need to add more PATCH APIs to allow Adding and Removing items from collections like: |
Hate to bring up a closed issue, but was this ever addressed? For now, it requires getting all of the artifacts/observables from the existing alert, then re-builiding the alert, and adding the new ones I want to add. The ability to easily |
Hi, are there any updates on this issue? |
Request Type
Bug
Work Environment
Problem Description
It is impossible to update an alert's list of observables using HTTP PATCH on route
/api/alert/:alertId
(as described in the documentation).When trying to do so, the server replies with status code 400 and a message like this one:
Steps to Reproduce
/api/alert/:alertId
with a list of artifacts to update.Example:
Complementary information
Note that the user requires read+write permissions in order to be allowed to update alerts in the first place. Indeed, the alert role only is not sufficient or you'll be greeted with a 403.
I tried to include all observables (ie including already existing ones) as well as only the new ones to be added and the result is the same in both cases.
Note also that it fails whether the alert already has artifacts or not.
The text was updated successfully, but these errors were encountered: