-
Notifications
You must be signed in to change notification settings - Fork 640
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] Slow getting case observables via API get_case_observables #2218
Comments
As a workaround it's possible to make a petition as the frontend does, and it spends less than a second to get the case observables: curl -XPOST -H "Authorization: Bearer XXXXX" "https:///api/v1/query?name=observables" -H "Content-Type: application/json" -d '{"query":[{"_name":"getCase","idOrName":"~985923760"},{"_name":"observables"},{"_name":"sort","_fields":[{"startDate":"desc"}]},{"_name":"page","from":0,"to":100,"extraData":["seen","permissions","shareCount"]}]}' |
I think this is related to #2149 There are several querys not migrated from thv3 to thv4 |
This also may be linked to #2116 |
This issue has been fixed by #2225 |
We updated our instance to TheHive 4.1.13 and the issue is still there. I've made a test this afternoon and it tooks 20 minutes to retrieve the observables of a specific case via I can confirm that the workaround suggested by @jpferrero is also working for us. |
We have the same problem on 4.1.14 |
Request Type
Bug
Work Environment
Problem Description
Trying to get observables from a case_id via TheHive4py, it takes more than 3 minutes to run the query.
This is the TheHive4py call:
api = TheHiveApi(THEHIVE_URL, THEHIVE_API_KEY, cert=False)
api.get_case_observables("~492589064", query={}, sort=['-startDate', '+ioc'], range='all')
Time:
real 3m22.734s
user 0m0.141s
sys 0m0.023s
There are a total of 367848 of observables and 24872 cases in our database.
Thanks.
The text was updated successfully, but these errors were encountered: