Skip to content
New issue

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

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

Already on GitHub? # to your account

[Bug] Get observables of a case using API not working #1357

Closed
yorkvik opened this issue May 25, 2020 · 3 comments
Closed

[Bug] Get observables of a case using API not working #1357

yorkvik opened this issue May 25, 2020 · 3 comments
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@yorkvik
Copy link

yorkvik commented May 25, 2020

When trying to get the observables of a case using the api, I get this response :

{"type": "BadRequest", "message": "Property _id for type org.thp.thehive.services.ObservableSteps not found"}

I'm using TheHive4py function : get_case_observables().

Is there another way to get all the observables of a case? Or can you please solve this bug?

Thank you

@yorkvik yorkvik added TheHive4 TheHive4 related issues bug labels May 25, 2020
@nadouani nadouani added this to the 4.0.0-RC3 milestone May 25, 2020
@nadouani
Copy link
Contributor

@To-om this is because of the _id search operator is missing.

The get_case_observable() method used the following json body to call /api/case/_search:

{
  "_and": [
    {
      "_parent": {
        "_type": "case",
        "_query": {
          "_id": "CASE_ID"
        },
      }
    },
    {
      ...
    }
  ] 
}

The issue here is that TheHive 4 doesn't have support to _id

@nadouani
Copy link
Contributor

@sisecbe we will address the issue, thanks for the catch.

@nadouani
Copy link
Contributor

This is most certainly fixed by #1344

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

3 participants