Comments (5)
Hi @crackytsi, quick question about checking for the existence of a tag attribute on a case. The tags
attribute of the Case
class is just a list, so you can check that with 'tagname' in case.tags
but I can happily add a has_tag()
method to do that if preferred.
Or did you mean to search for all cases with a given tag? If so I think you'll need to use the find_cases()
method but I'm not exactly sure how to search by tag, would have to check the docs.
from thehive4py.
Actually both :)
The search itself is really ugly and a wrapper class could be more than usefull.
As I wrote a tool that synchronizes with TheHive I required both functionalities.
A hasTag function is of course not needed, but nice to have :)
from thehive4py.
Thanks for the reply. The search improvements probably need to be split out to a separate issue, I'm not familiar enough with how it works now but can have a look.
Regarding finding all Tasks of a Case, is there something that get_case_tasks()
doesn't provide?
from thehive4py.
So as far as I see not :)
from thehive4py.
@crackytsi So to answer your questions, please see below
Check for existens of an Tag attribute on a case
You can fetch the case by ID and check its tag attribute
Find all Tasks of a Case
You can use TheHiveApi.get_case_tasks
method
Get technical ID of UI caseID
You can find the case by using TheHiveApi.find_first(query=Eq('caseId', 2))
method
Get UI caseID of technical CaseId
You can find the case TheHiveApi.find_first(query=Id('CASE_INTERNAL ID'))
and get the caseId
property of it
Iterate over task-log entries within a task.
You can use TheHiveApi.get_task_logs
method
Add, removed, Edit a customField
You can update the case's customField attribute (could be improved later in fact)
from thehive4py.
Related Issues (20)
- Export (Reports, Notifications Integration (API) Incidents HOT 1
- Docstring for the endpoints scripts
- find_cases() with ContainsStrings() not compatible with TH5 HOT 3
- Enhance readme HOT 1
- TheHive4py integration tests - No persistence for licensing HOT 4
- Getting rid of develop branch HOT 2
- Enhance cortex endpoint
- Add automatic build and pypi deployment workflow HOT 2
- Create more thorough documentation
- Revisit 5.x endpoints
- Develop a query builder for the query endpoint
- Change licensing to MIT
- [Tests] kamforka/thehive4py-integrator:thehive-5.2.4 doesn't exist HOT 1
- Get rid of setup.cfg in favor of pyproject.toml
- Unable to create Observables during Alert creation or after HOT 8
- Review type hints for Input/Output objects
- Attachement to an alert HOT 1
- Add the possibility to download files and keep them in a variable HOT 2
- Rework integration test container
- Need ability to change task group from detault HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thehive4py.