-
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
Automatic Incident #93
Comments
Hi @CommiAI, From a technical point of view, the answer is YES: all the actions that could be made from the UI are backed by REST APIs. We "just" need to document them. What are your use cases? |
Hi @CommiAI, The API documentation is still in draft but it should give you enough information to create a case. |
Thank you for your answers. Any idea ? |
There are two errors:
The command is:
|
Indeed, this was indeed the error. Ps: You should also change here: "https://github.com/CERT-BDF/TheHive/wiki/API-Documentation----Draft#authentication " (Remove 's' at cases) Thanks again |
You don't need to specify the content type on requests that don't contain body. |
I have another question about api, how to add a task to a case ? |
The request for creating a task is not yet documented but is pretty similar as the previous, with the URL
The documentation describes available fields for case and for task entities. |
Thank you for your reply. When I issue your order, it returns the error "A client error occurred". |
Yes, the URL should include the case id: "/api/case/:caseId/task" |
For example, my case #4, his url is /api/case/4 ? |
Ok my bad. When you create a case, the API response contains the details of the created case, for example
In this case, the case ID is
To create a task for this case, you can call
Notice the case's ID in the URL |
Oh ok ! I understand and my order works! |
Note that you can provide the tasks when you create the case:
As we said, the API documentation is not yet complete, so we are trying to help as much as we can until the full documentation is released |
Convenient ! Is it possible to create a case from a template using curl? |
The internal name for observable is
Available attributes of artifact can be found here All back-end URLs are listed in the routes files. |
Currently, case template is handled by front-end. You can retrieve content of a case template ( |
Thanks thanks ! |
And so, I imagine it is possible, in a command, to create a case, create a task and create an observable. |
No I don't think that the case creation API allows providing observables, because we cannot mix file observables (which require multipart) and non file observables. |
Never mind. PS: it's not possible to removed a user with api ? |
Sorry I don't get the question. What do you mean by "the attribute for the rights", you mean the roles and permissions? |
Yes, that's it ! |
OK, you can create the user with the following body:
|
Ok thanks, but not possible to removed ? |
Not currently, but you can "lock" a user by doing a
on the following URL
|
Okay ! And where can we find the :caseTemplateId ? |
You can list case templates using the following command:
|
Hello ! When I issue a _search command, the response appears as a large block with information everywhere, except for users where the information is tidy. Is there a parameter to fill in? Thank you |
Hi @CommiAI, what are you trying to do with the APIs? what's your use case? _search APIs are search apis that support a certain syntax for filtering, sorting etc... so it depends on what you are searching for. IMHO, there are three options:
I personally think that the second option is the best one |
So, i chose the 3rd option ;) |
That means that you have a lot to do with TheHive :) |
Request Type
Question
Problem Description
Hello, I wanted to know if there was a way (via a script or via an API) to automatically generate incidents.
Cordially
The text was updated successfully, but these errors were encountered: