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

No API Alert documentation #203

Closed
ST2Labs opened this issue May 15, 2017 · 4 comments
Closed

No API Alert documentation #203

ST2Labs opened this issue May 15, 2017 · 4 comments
Assignees
Milestone

Comments

@ST2Labs
Copy link

ST2Labs commented May 15, 2017

Request Type

Feature Request

Work Environment

Question Answer
OS version (server) Ubuntu
OS version (client) 16.04
TheHive version / git hash 2.11.0
Package Type Binary
Browser type & version Firefox

Problem Description

I haven't document API to send Alert to Hive | I start to send alerts but if the same Alert repeat obtain this error:

"type":"ConflictError","message":"[alert][d159c8f799206d5fa6eef66f67910e1c]: document already exists","object" ...

Steps to Reproduce

  1. Send one Alert
  2. Repeat to send Alert
  3. Get Error / Not Update working ...

Possible Solutions

How Can I update Alert ? It's possible? What happend if you have Alert waiting to "read" and receive a nother Alert with same "title", "type" etc.. but description body diferrent?

Which is the correct way to send Alert ? I reading https://github.com/CERT-BDF/TheHive4py/blob/master/thehive4py/api.py to "understand API Hive to Alert".

Thanks in advance!

@To-om To-om self-assigned this May 15, 2017
@saadkadhi
Copy link
Contributor

Hi @ST2Labs

Thank you for raising this issue. We are going to produce the missing documentation shortly.

@To-om
Copy link
Contributor

To-om commented May 16, 2017

Hi @ST2Labs

I'm writing API documentation for alerts.

When you create an alert, you must set:

  • its type (e.g. SIEM, MISP, Mail)
  • source which defines the component that send the alert
  • sourceRef which is a reference of the source (e.g. mail ID, SIEM alertID, ...)

These 3 attributes must be unique, otherwise TheHive considers that the alert already exists an refuse to create a new one. Maybe you should generate a random reference for sourceRef if you don't have ID for each alert.

@ST2Labs
Copy link
Author

ST2Labs commented May 16, 2017

¡ Good ! | OK I will try it and feedback the results!

Thanks !

@To-om
Copy link
Contributor

To-om commented May 17, 2017

You can find alert API documentation here. It is not complete be there is initial information to create alerts. If you have difficulties with alert API, feel free to reopen this issue, I'll complete documentation with information you need.

@To-om To-om closed this as completed May 17, 2017
@nadouani nadouani added this to the 2.11.1 milestone May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants