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] WebHook creation does not work #1318

Closed
crackytsi opened this issue May 12, 2020 · 6 comments
Closed

[Bug] WebHook creation does not work #1318

crackytsi opened this issue May 12, 2020 · 6 comments
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@crackytsi
Copy link

Bug / Feature Request

Work Environment

Question Answer
OS version (server) Debian
OS version (client) 10
TheHive version / git hash 4 RC2
Package Type DEB

Problem Description

I tried to create a webhook.
Basically there is a little mistake in the documentation about the curl command, see my PR here:
TheHive-Project/TheHiveDocs#167

But never the less, after creation it just returns:
{"path":"notification","defaultValue":[],"value":null}

Which sounds wrong to my eyes.
After trying to perform a get command to /api/config/organisation/notification it is also returning this result.
The WebHook does not work.
Can you take a look into that and give me a little hint?

@To-om
Copy link
Contributor

To-om commented May 16, 2020

The documentation was wrong. The correct body is:

{
  "value": [
    {
      "delegate": false,
      "trigger": { "name": "AnyEvent"},
      "notifier": { "name": "webhook", "endpoint": "local" }
    }
  ]
}

@crackytsi I let you tell me if webhooks work for you before I close this issue.

@aacgood
Copy link

aacgood commented May 16, 2020 via email

@crackytsi
Copy link
Author

@To-om : Thank you very much, it works.
Can you please also share a curl that removes this configuration?

I also noted that compared to the old-webhook all nested objects are added (e.g. update of log --> contains data of case-task and case). Meanwhile in some situtations that might be helpfull in others this generates bigger responses and slows down the speed. Is this configurable to have the output same as in the 2.x and 3.x releases?

To-om added a commit that referenced this issue May 18, 2020
@To-om
Copy link
Contributor

To-om commented May 18, 2020

Now version 0 doesn't include parent object and version 1 does. This let you choose.

@To-om To-om closed this as completed May 18, 2020
@To-om
Copy link
Contributor

To-om commented May 18, 2020

@crackytsi if you want to remove webhook, set an empty list:

curl -XPUT \
  -u$thehive_user:$thehive_password \
  -H 'Content-type: application/json' \
  $thehive_url/api/config/organisation/notification -d '
    {
      "value": []
    }
  '

@crackytsi
Copy link
Author

Thank you very much :)

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

5 participants
@nadouani @crackytsi @To-om @aacgood and others