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] TheHive4 'follow/unfollow' API doesn't return alert objects like TheHive3 does #1571

Closed
graememeyer opened this issue Oct 6, 2020 · 1 comment
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@graememeyer
Copy link

[Bug] TheHive4 'follow/unfollow' API doesn't return alert objects like TheHive3 does

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu 18 (Training VM)
OS version (client) Windows 10.
TheHive version / git hash 4.0
Package Type Training VM
Browser type & version N/A

Problem Description

TheHive blog says that TheHive v4's API should be backwards compatible with TheHive3, but the version 3 API for follow/unfollow returns the modified alert object and the version 4 API doesn't.

Steps to Reproduce

Version 4:

curl -X POST -H 'Authorization: Bearer 7ywJAe8sk9v0qCPjWF0ysrc7+Q6JouTR' -H 'Content-Type: application/json' -H 'X-Organization: TestOrg' http://thehive4.local:9000/api/alert/82100472/follow

Version 3:

curl -X POST -H 'Authorization: Bearer SuGd5Aj4NNudH8unh5CpWLm4U/MYDeVc' -H 'Content-Type: application/json' http://thehive3.local:9000/api/alert/86551c0a126f54fc91bf2d88245ace18/follow
{"date":1601986293538,"severity":3,"_routing":"86551c0a126f54fc91bf2d88245ace18","updatedBy":"admin","customFields":{},"_type":"alert","description":"Testing an alert. ixjnxecd","lastSyncDate":1601986306685,"source":"Pester","title":"Test alert: ixjnxecd","type":"API","follow":true,"createdAt":1601986306680,"_parent":null,"createdBy":"admin","tlp":2,"_id":"86551c0a126f54fc91bf2d88245ace18","id":"86551c0a126f54fc91bf2d88245ace18","sourceRef":"78288","_version":2,"artifacts":[],"updatedAt":1601996256405,"status":"New"}                                                                                                                                                                 ✔
@graememeyer graememeyer added TheHive4 TheHive4 related issues bug labels Oct 6, 2020
@To-om To-om self-assigned this Oct 8, 2020
@graememeyer
Copy link
Author

I've checked and the "markAsRead" and "markAsUnread" APIs display this same behaviour.

@To-om is there public documentation available for the TheHive4 APIs? I was building a PowerShell API library and got it mostly working with TH3 okay, but finding TH4 just totally different and unable to find documentation on it.

@To-om To-om added this to the 4.0.1 milestone Oct 15, 2020
@To-om To-om closed this as completed Oct 15, 2020
To-om added a commit that referenced this issue Oct 15, 2020
To-om added a commit that referenced this issue Nov 13, 2020
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

2 participants