API Reference
thehive4py
client
TheHiveApi(url, apikey=None, username=None, password=None, organisation=None, verify=True, max_retries=DEFAULT_RETRY)
Create a client of TheHive API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
TheHive's url. |
required |
apikey
|
Optional[str]
|
TheHive's apikey. It's required if |
None
|
username
|
Optional[str]
|
TheHive's username. It's required if |
None
|
password
|
Optional[str]
|
TheHive's password. It's required if |
None
|
organisation
|
Optional[str]
|
TheHive organisation to use in the session. |
None
|
verify
|
VerifyValue
|
Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use. |
True
|
max_retries
|
RetryValue
|
Either |
DEFAULT_RETRY
|
Source code in thehive4py/client.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
session = TheHiveSession(url=url, apikey=apikey, username=username, password=password, verify=verify, max_retries=max_retries)
instance-attribute
alert = AlertEndpoint(self.session)
instance-attribute
case = CaseEndpoint(self.session)
instance-attribute
comment = CommentEndpoint(self.session)
instance-attribute
observable = ObservableEndpoint(self.session)
instance-attribute
procedure = ProcedureEndpoint(self.session)
instance-attribute
task = TaskEndpoint(self.session)
instance-attribute
task_log = TaskLogEndpoint(self.session)
instance-attribute
timeline = TimelineEndpoint(self.session)
instance-attribute
user = UserEndpoint(self.session)
instance-attribute
organisation = OrganisationEndpoint(self.session)
instance-attribute
profile = ProfileEndpoint(self.session)
instance-attribute
custom_field = CustomFieldEndpoint(self.session)
instance-attribute
observable_type = ObservableTypeEndpoint(self.session)
instance-attribute
cortex = CortexEndpoint(self.session)
instance-attribute
query = QueryEndpoint(self.session)
instance-attribute
session_organisation: Optional[str]
property
writable
session
DEFAULT_RETRY = Retry(total=5, backoff_factor=1, status_forcelist=[500, 502, 503, 504], allowed_methods=['GET', 'POST', 'PUT', 'PATCH', 'DELETE'], raise_on_status=False)
module-attribute
RetryValue = Union[Retry, int, None]
module-attribute
VerifyValue = Union[bool, str]
module-attribute
TheHiveSession(url, apikey=None, username=None, password=None, verify=True, max_retries=DEFAULT_RETRY)
Bases: Session
Source code in thehive4py/session.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
hive_url = self._sanitize_hive_url(url)
instance-attribute
verify = verify
instance-attribute
make_request(method, path, params=None, data=None, json=None, files=None, download_path=None)
Source code in thehive4py/session.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
endpoints
alert
AlertEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create(alert, attachment_map=None)
Create an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert
|
InputAlert
|
The body of the alert. |
required |
attachment_map
|
Optional[Dict[str, str]]
|
An optional mapping of observable attachment keys and paths. |
None
|
Returns:
Type | Description |
---|---|
OutputAlert
|
The created alert. |
Source code in thehive4py/endpoints/alert.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
get(alert_id)
Get an alert by id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
Returns:
Type | Description |
---|---|
OutputAlert
|
The alert specified by the id. |
Source code in thehive4py/endpoints/alert.py
47 48 49 50 51 52 53 54 55 56 57 |
|
update(alert_id, fields)
Update an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
fields
|
InputUpdateAlert
|
The fields of the alert to update. |
required |
Returns:
Type | Description |
---|---|
None
|
N/A |
Source code in thehive4py/endpoints/alert.py
59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
delete(alert_id)
Delete an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
Returns:
Type | Description |
---|---|
None
|
N/A |
Source code in thehive4py/endpoints/alert.py
73 74 75 76 77 78 79 80 81 82 |
|
bulk_update(fields)
Update multiple alerts with the same values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fields
|
InputBulkUpdateAlert
|
The ids and the fields of the alerts to update. |
required |
Returns:
Type | Description |
---|---|
None
|
N/A |
Source code in thehive4py/endpoints/alert.py
84 85 86 87 88 89 90 91 92 93 94 95 |
|
bulk_delete(ids)
Delete multiple alerts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ids
|
List[str]
|
The ids of the alerts to delete. |
required |
Returns:
Type | Description |
---|---|
None
|
N/A |
Source code in thehive4py/endpoints/alert.py
97 98 99 100 101 102 103 104 105 106 107 108 |
|
follow(alert_id)
Follow an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
Returns:
Type | Description |
---|---|
None
|
N/A |
Source code in thehive4py/endpoints/alert.py
110 111 112 113 114 115 116 117 118 119 |
|
unfollow(alert_id)
Unfollow an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
Returns:
Type | Description |
---|---|
None
|
N/A |
Source code in thehive4py/endpoints/alert.py
121 122 123 124 125 126 127 128 129 130 |
|
promote_to_case(alert_id, fields={})
Promote an alert into a case.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
fields
|
InputPromoteAlert
|
Override for the fields of the case created from the alert. |
{}
|
Returns:
Type | Description |
---|---|
OutputCase
|
The case from the promoted alert. |
Source code in thehive4py/endpoints/alert.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
create_observable(alert_id, observable, observable_path=None)
Create an observable in an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
observable
|
InputObservable
|
The fields of the observable to create. |
required |
observable_path
|
Optional[str]
|
Optional path in case of a file based observable. |
None
|
Returns:
Type | Description |
---|---|
List[OutputObservable]
|
The created alert observables. |
Source code in thehive4py/endpoints/alert.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
add_attachment(alert_id, attachment_paths)
Create an observable in an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
attachment_paths
|
List[str]
|
List of paths to the attachments to create. |
required |
Returns:
Type | Description |
---|---|
List[OutputAttachment]
|
The created alert attachments. |
Source code in thehive4py/endpoints/alert.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
download_attachment(alert_id, attachment_id, attachment_path)
Download an alert attachment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
attachment_id
|
str
|
The id of the alert attachment. |
required |
attachment_path
|
str
|
The local path to download the attachment to. |
required |
Returns:
Type | Description |
---|---|
None
|
N/A |
Source code in thehive4py/endpoints/alert.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
|
delete_attachment(alert_id, attachment_id)
Delete an alert attachment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
attachment_id
|
str
|
The id of the alert attachment. |
required |
Returns:
Type | Description |
---|---|
None
|
N/A |
Source code in thehive4py/endpoints/alert.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
merge_into_case(alert_id, case_id)
Merge an alert into an existing case.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert to merge. |
required |
case_id
|
str
|
The id of the case to merge the alert into. |
required |
Returns:
Type | Description |
---|---|
OutputCase
|
The case into which the alert was merged. |
Source code in thehive4py/endpoints/alert.py
228 229 230 231 232 233 234 235 236 237 238 239 240 |
|
bulk_merge_into_case(case_id, alert_ids)
Merge an alert into an existing case.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
case_id
|
str
|
The id of the case to merge the alerts into. |
required |
alert_ids
|
List[str]
|
The list of alert ids to merge. |
required |
Returns:
Type | Description |
---|---|
OutputCase
|
The case into which the alerts were merged. |
Source code in thehive4py/endpoints/alert.py
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
|
find(filters=None, sortby=None, paginate=None)
Find multiple alerts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filters
|
Optional[FilterExpr]
|
The filter expressions to apply in the query. |
None
|
sortby
|
Optional[SortExpr]
|
The sort expressions to apply in the query. |
None
|
paginate
|
Optional[Paginate]
|
The pagination experssion to apply in the query. |
None
|
Returns:
Type | Description |
---|---|
List[OutputAlert]
|
The list of alerts matched by the query or an empty list. |
Source code in thehive4py/endpoints/alert.py
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
|
count(filters=None)
Count alerts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filters
|
Optional[FilterExpr]
|
The filter expressions to apply in the query. |
None
|
Returns:
Type | Description |
---|---|
int
|
The count of alerts matched by the query. |
Source code in thehive4py/endpoints/alert.py
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
|
find_observables(alert_id, filters=None, sortby=None, paginate=None)
Find observable related to an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
filters
|
Optional[FilterExpr]
|
The filter expressions to apply in the query. |
None
|
sortby
|
Optional[SortExpr]
|
The sort expressions to apply in the query. |
None
|
paginate
|
Optional[Paginate]
|
The pagination experssion to apply in the query. |
None
|
Returns:
Type | Description |
---|---|
List[OutputObservable]
|
The list of alert observables matched by the query or an empty list. |
Source code in thehive4py/endpoints/alert.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
|
find_comments(alert_id, filters=None, sortby=None, paginate=None)
Find comments related to an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
filters
|
Optional[FilterExpr]
|
The filter expressions to apply in the query. |
None
|
sortby
|
Optional[SortExpr]
|
The sort expressions to apply in the query. |
None
|
paginate
|
Optional[Paginate]
|
The pagination experssion to apply in the query. |
None
|
Returns:
Type | Description |
---|---|
List[OutputComment]
|
The list of alert comments matched by the query or an empty list. |
Source code in thehive4py/endpoints/alert.py
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
|
create_procedure(alert_id, procedure)
Create an alert procedure.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
procedure
|
InputProcedure
|
The fields of the procedure to create. |
required |
Returns:
Type | Description |
---|---|
OutputProcedure
|
The created alert procedure. |
Source code in thehive4py/endpoints/alert.py
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
find_procedures(alert_id, filters=None, sortby=None, paginate=None)
Find procedures related to an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
filters
|
Optional[FilterExpr]
|
The filter expressions to apply in the query. |
None
|
sortby
|
Optional[SortExpr]
|
The sort expressions to apply in the query. |
None
|
paginate
|
Optional[Paginate]
|
The pagination experssion to apply in the query. |
None
|
Returns:
Type | Description |
---|---|
List[OutputProcedure]
|
The list of alert procedures matched by the query or an empty list. |
Source code in thehive4py/endpoints/alert.py
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
|
find_attachments(alert_id, filters=None, sortby=None, paginate=None)
Find attachments related to an alert.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_id
|
str
|
The id of the alert. |
required |
filters
|
Optional[FilterExpr]
|
The filter expressions to apply in the query. |
None
|
sortby
|
Optional[SortExpr]
|
The sort expressions to apply in the query. |
None
|
paginate
|
Optional[Paginate]
|
The pagination experssion to apply in the query. |
None
|
Returns:
Type | Description |
---|---|
List[OutputAttachment]
|
The list of alert attachments matched by the query or an empty list. |
Source code in thehive4py/endpoints/alert.py
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
|
case
CaseId = Union[str, int]
module-attribute
CaseEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create(case)
Source code in thehive4py/endpoints/case.py
34 35 |
|
get(case_id)
Source code in thehive4py/endpoints/case.py
37 38 |
|
delete(case_id)
Source code in thehive4py/endpoints/case.py
40 41 |
|
update(case_id, fields={}, **kwargs)
Source code in thehive4py/endpoints/case.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
bulk_update(fields)
Source code in thehive4py/endpoints/case.py
66 67 68 69 |
|
merge(case_ids)
Source code in thehive4py/endpoints/case.py
71 72 73 74 75 |
|
unlink_alert(case_id, alert_id)
Source code in thehive4py/endpoints/case.py
77 78 79 80 |
|
merge_similar_observables(case_id)
Source code in thehive4py/endpoints/case.py
82 83 84 85 86 |
|
get_linked_cases(case_id)
Source code in thehive4py/endpoints/case.py
88 89 |
|
delete_custom_field(custom_field_id)
Source code in thehive4py/endpoints/case.py
91 92 93 94 |
|
import_from_file(import_case, import_path)
Source code in thehive4py/endpoints/case.py
96 97 98 99 100 101 102 103 |
|
export_to_file(case_id, password, export_path)
Source code in thehive4py/endpoints/case.py
105 106 107 108 109 110 111 |
|
get_timeline(case_id)
Source code in thehive4py/endpoints/case.py
113 114 |
|
add_attachment(case_id, attachment_paths)
Source code in thehive4py/endpoints/case.py
116 117 118 119 120 121 122 123 124 125 |
|
download_attachment(case_id, attachment_id, attachment_path)
Source code in thehive4py/endpoints/case.py
127 128 129 130 131 132 133 134 |
|
delete_attachment(case_id, attachment_id)
Source code in thehive4py/endpoints/case.py
136 137 138 139 |
|
list_shares(case_id)
Source code in thehive4py/endpoints/case.py
141 142 |
|
share(case_id, shares)
Source code in thehive4py/endpoints/case.py
144 145 146 147 |
|
unshare(case_id, organisation_ids)
Source code in thehive4py/endpoints/case.py
149 150 151 152 153 154 |
|
set_share(case_id, shares)
Source code in thehive4py/endpoints/case.py
156 157 158 159 |
|
remove_share(share_id)
Source code in thehive4py/endpoints/case.py
161 162 163 164 |
|
update_share(share_id, profile)
Source code in thehive4py/endpoints/case.py
166 167 168 169 |
|
find(filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/case.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
count(filters=None)
Source code in thehive4py/endpoints/case.py
189 190 191 192 193 194 195 196 197 198 199 200 201 |
|
create_task(case_id, task)
Source code in thehive4py/endpoints/case.py
203 204 205 206 207 208 |
|
find_tasks(case_id, filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/case.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
|
create_observable(case_id, observable, observable_path=None)
Source code in thehive4py/endpoints/case.py
230 231 232 233 234 235 236 237 238 239 240 241 |
|
find_observables(case_id, filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/case.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
|
create_procedure(case_id, procedure)
Source code in thehive4py/endpoints/case.py
262 263 264 265 266 267 |
|
find_procedures(case_id, filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/case.py
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
|
create_page(case_id, page)
Source code in thehive4py/endpoints/case.py
289 290 291 292 |
|
delete_page(case_id, page_id)
Source code in thehive4py/endpoints/case.py
294 295 296 297 |
|
update_page(case_id, page_id, page)
Source code in thehive4py/endpoints/case.py
299 300 301 302 303 304 |
|
find_pages(case_id, filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/case.py
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
|
find_attachments(case_id, filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/case.py
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
|
find_comments(case_id, filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/case.py
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
|
close(case_id, status, summary, impact_status='NotApplicable')
Source code in thehive4py/endpoints/case.py
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
|
open(case_id, status=CaseStatus.InProgress)
Source code in thehive4py/endpoints/case.py
381 382 383 384 385 |
|
comment
CommentEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create_in_alert(alert_id, comment)
Source code in thehive4py/endpoints/comment.py
7 8 9 10 |
|
create_in_case(case_id, comment)
Source code in thehive4py/endpoints/comment.py
12 13 14 15 |
|
get(comment_id)
Source code in thehive4py/endpoints/comment.py
17 18 19 20 21 22 23 24 25 26 27 |
|
delete(comment_id)
Source code in thehive4py/endpoints/comment.py
29 30 31 32 |
|
update(comment_id, fields)
Source code in thehive4py/endpoints/comment.py
34 35 36 37 |
|
cortex
CortexEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create_analyzer_job(cortex_id, analyzer_id, observable_id)
Source code in thehive4py/endpoints/cortex.py
5 6 7 8 9 10 11 12 13 14 15 16 |
|
create_responder_action(object_id, object_type, responder_id)
Source code in thehive4py/endpoints/cortex.py
18 19 20 21 22 23 24 25 26 27 28 29 |
|
custom_field
CustomFieldEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create(custom_field)
Source code in thehive4py/endpoints/custom_field.py
12 13 14 15 |
|
list()
Source code in thehive4py/endpoints/custom_field.py
17 18 |
|
delete(custom_field_id)
Source code in thehive4py/endpoints/custom_field.py
20 21 22 23 |
|
update(custom_field_id, fields)
Source code in thehive4py/endpoints/custom_field.py
25 26 27 28 |
|
observable
ObservableEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create_in_alert(alert_id, observable, observable_path=None)
Source code in thehive4py/endpoints/observable.py
18 19 20 21 22 23 24 25 26 27 28 29 |
|
create_in_case(case_id, observable, observable_path=None)
Source code in thehive4py/endpoints/observable.py
31 32 33 34 35 36 37 38 39 40 41 42 |
|
get(observable_id)
Source code in thehive4py/endpoints/observable.py
44 45 46 47 |
|
delete(observable_id)
Source code in thehive4py/endpoints/observable.py
49 50 51 52 |
|
update(observable_id, fields)
Source code in thehive4py/endpoints/observable.py
54 55 56 57 |
|
bulk_update(fields)
Source code in thehive4py/endpoints/observable.py
59 60 61 62 |
|
share(observable_id, organisations)
Source code in thehive4py/endpoints/observable.py
64 65 66 67 68 69 |
|
unshare(observable_id, organisations)
Source code in thehive4py/endpoints/observable.py
71 72 73 74 75 76 |
|
list_shares(observable_id)
Source code in thehive4py/endpoints/observable.py
78 79 80 81 |
|
find(filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/observable.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
count(filters=None)
Source code in thehive4py/endpoints/observable.py
101 102 103 104 105 106 107 108 109 110 111 112 113 |
|
download_attachment(observable_id, attachment_id, observable_path, as_zip=False)
Source code in thehive4py/endpoints/observable.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
observable_type
ObservableTypeEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create(observable_type)
Source code in thehive4py/endpoints/observable_type.py
15 16 17 18 |
|
get(observable_type_id)
Source code in thehive4py/endpoints/observable_type.py
20 21 22 23 |
|
delete(observable_type_id)
Source code in thehive4py/endpoints/observable_type.py
25 26 27 28 |
|
find(filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/observable_type.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
organisation
OrganisationEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create(organisation)
Source code in thehive4py/endpoints/organisation.py
19 20 21 22 |
|
get(org_id)
Source code in thehive4py/endpoints/organisation.py
24 25 |
|
update(org_id, fields)
Source code in thehive4py/endpoints/organisation.py
27 28 29 30 |
|
delete(org_id)
Source code in thehive4py/endpoints/organisation.py
32 33 34 35 |
|
link(org_id, other_org_id, link)
Source code in thehive4py/endpoints/organisation.py
37 38 39 40 |
|
unlink(org_id, other_org_id)
Source code in thehive4py/endpoints/organisation.py
42 43 44 45 |
|
list_links(org_id)
Source code in thehive4py/endpoints/organisation.py
47 48 49 50 |
|
bulk_link(org_id, links)
Source code in thehive4py/endpoints/organisation.py
52 53 54 55 |
|
list_sharing_profiles()
Source code in thehive4py/endpoints/organisation.py
57 58 |
|
find(filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/organisation.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
count(filters=None)
Source code in thehive4py/endpoints/organisation.py
78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
procedure
ProcedureEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create_in_alert(alert_id, procedure)
Source code in thehive4py/endpoints/procedure.py
17 18 19 20 21 22 |
|
create_in_case(case_id, procedure)
Source code in thehive4py/endpoints/procedure.py
24 25 26 27 28 29 |
|
get(procedure_id)
Source code in thehive4py/endpoints/procedure.py
31 32 33 34 35 36 37 38 39 40 41 |
|
delete(procedure_id)
Source code in thehive4py/endpoints/procedure.py
43 44 45 46 |
|
update(procedure_id, fields)
Source code in thehive4py/endpoints/procedure.py
48 49 50 51 |
|
find(filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/procedure.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
profile
ProfileEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create(profile)
Source code in thehive4py/endpoints/profile.py
12 13 |
|
get(profile_id)
Source code in thehive4py/endpoints/profile.py
15 16 |
|
delete(profile_id)
Source code in thehive4py/endpoints/profile.py
18 19 |
|
update(profile_id, fields)
Source code in thehive4py/endpoints/profile.py
21 22 23 24 |
|
find(filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/profile.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
count(filters=None)
Source code in thehive4py/endpoints/profile.py
44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
query
QueryEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
run(query, exclude_fields=[])
Source code in thehive4py/endpoints/query.py
7 8 9 10 11 12 13 14 |
|
task
TaskEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create(case_id, task)
Source code in thehive4py/endpoints/task.py
18 19 20 21 |
|
get(task_id)
Source code in thehive4py/endpoints/task.py
23 24 |
|
delete(task_id)
Source code in thehive4py/endpoints/task.py
26 27 |
|
update(task_id, fields)
Source code in thehive4py/endpoints/task.py
29 30 31 32 |
|
bulk_update(fields)
Source code in thehive4py/endpoints/task.py
34 35 36 37 |
|
get_required_actions(task_id)
Source code in thehive4py/endpoints/task.py
39 40 41 42 |
|
set_as_required(task_id, org_id)
Source code in thehive4py/endpoints/task.py
44 45 46 47 |
|
set_as_done(task_id, org_id)
Source code in thehive4py/endpoints/task.py
49 50 51 52 |
|
share()
Source code in thehive4py/endpoints/task.py
54 55 |
|
list_shares()
Source code in thehive4py/endpoints/task.py
57 58 |
|
unshare()
Source code in thehive4py/endpoints/task.py
60 61 |
|
find(filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/task.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
count(filters=None)
Source code in thehive4py/endpoints/task.py
81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
create_log(task_id, task_log)
Source code in thehive4py/endpoints/task.py
95 96 97 98 |
|
find_logs(task_id, filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/task.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
task_log
TaskLogEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create(task_id, task_log)
Source code in thehive4py/endpoints/task_log.py
9 10 11 12 |
|
get(task_log_id)
Source code in thehive4py/endpoints/task_log.py
14 15 16 17 18 19 20 21 22 23 24 25 |
|
delete(task_log_id)
Source code in thehive4py/endpoints/task_log.py
27 28 |
|
update(task_log_id, fields)
Source code in thehive4py/endpoints/task_log.py
30 31 32 33 |
|
add_attachments(task_log_id, attachment_paths)
Source code in thehive4py/endpoints/task_log.py
35 36 37 38 39 40 41 42 |
|
delete_attachment(task_log_id, attachment_id)
Source code in thehive4py/endpoints/task_log.py
44 45 46 47 |
|
timeline
TimelineEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
get(case_id)
Source code in thehive4py/endpoints/timeline.py
11 12 |
|
create_event(case_id, event)
Source code in thehive4py/endpoints/timeline.py
14 15 16 17 |
|
delete_event(event_id)
Source code in thehive4py/endpoints/timeline.py
19 20 21 22 |
|
update_event(event_id, fields)
Source code in thehive4py/endpoints/timeline.py
24 25 26 27 |
|
user
UserEndpoint(session)
Bases: EndpointBase
Source code in thehive4py/endpoints/_base.py
15 16 |
|
create(user)
Source code in thehive4py/endpoints/user.py
18 19 |
|
get(user_id)
Source code in thehive4py/endpoints/user.py
21 22 |
|
get_current()
Source code in thehive4py/endpoints/user.py
24 25 |
|
delete(user_id, organisation=None)
Source code in thehive4py/endpoints/user.py
27 28 29 30 31 32 |
|
update(user_id, fields)
Source code in thehive4py/endpoints/user.py
34 35 36 37 |
|
lock(user_id)
Source code in thehive4py/endpoints/user.py
39 40 |
|
unlock(user_id)
Source code in thehive4py/endpoints/user.py
42 43 |
|
set_organisations(user_id, organisations)
Source code in thehive4py/endpoints/user.py
45 46 47 48 49 50 51 52 |
|
set_password(user_id, password)
Source code in thehive4py/endpoints/user.py
54 55 56 57 58 59 |
|
get_apikey(user_id)
Source code in thehive4py/endpoints/user.py
61 62 |
|
remove_apikey(user_id)
Source code in thehive4py/endpoints/user.py
64 65 |
|
renew_apikey(user_id)
Source code in thehive4py/endpoints/user.py
67 68 69 70 |
|
get_avatar(user_id)
Source code in thehive4py/endpoints/user.py
72 73 74 |
|
find(filters=None, sortby=None, paginate=None)
Source code in thehive4py/endpoints/user.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
count(filters=None)
Source code in thehive4py/endpoints/user.py
94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
types
alert
InputAlertRequired
Bases: TypedDict
type: str
instance-attribute
source: str
instance-attribute
sourceRef: str
instance-attribute
title: str
instance-attribute
description: str
instance-attribute
InputAlert
Bases: InputAlertRequired
date: int
instance-attribute
externalLink: str
instance-attribute
severity: int
instance-attribute
tags: List[str]
instance-attribute
flag: bool
instance-attribute
tlp: int
instance-attribute
pap: int
instance-attribute
customFields: List[InputCustomFieldValue]
instance-attribute
summary: str
instance-attribute
status: str
instance-attribute
caseTemplate: str
instance-attribute
observables: List[InputObservable]
instance-attribute
procedures: List[InputProcedure]
instance-attribute
OutputAlertRequired
Bases: TypedDict
type: str
instance-attribute
source: str
instance-attribute
sourceRef: str
instance-attribute
title: str
instance-attribute
description: str
instance-attribute
severity: int
instance-attribute
date: int
instance-attribute
tlp: int
instance-attribute
pap: int
instance-attribute
follow: bool
instance-attribute
observableCount: int
instance-attribute
status: str
instance-attribute
stage: str
instance-attribute
extraData: dict
instance-attribute
newDate: int
instance-attribute
timeToDetect: int
instance-attribute
OutputAlert
Bases: OutputAlertRequired
externalLink: str
instance-attribute
tags: List[str]
instance-attribute
customFields: List[OutputCustomFieldValue]
instance-attribute
caseTemplate: str
instance-attribute
caseId: str
instance-attribute
summary: str
instance-attribute
inProgressDate: int
instance-attribute
closedDate: int
instance-attribute
importedDate: int
instance-attribute
timeToTriage: int
instance-attribute
timeToQualify: int
instance-attribute
timeToAcknowledge: int
instance-attribute
InputUpdateAlert
Bases: TypedDict
type: str
instance-attribute
source: str
instance-attribute
sourceRef: str
instance-attribute
externalLink: str
instance-attribute
title: str
instance-attribute
description: str
instance-attribute
severity: int
instance-attribute
date: int
instance-attribute
lastSyncDate: int
instance-attribute
tags: List[str]
instance-attribute
tlp: int
instance-attribute
pap: int
instance-attribute
follow: bool
instance-attribute
customFields: List[InputCustomFieldValue]
instance-attribute
status: str
instance-attribute
summary: str
instance-attribute
InputBulkUpdateAlert
Bases: InputUpdateAlert
ids: List[str]
instance-attribute
InputPromoteAlert
Bases: TypedDict
title: str
instance-attribute
description: str
instance-attribute
severity: int
instance-attribute
startDate: int
instance-attribute
endDate: int
instance-attribute
tags: List[str]
instance-attribute
flag: bool
instance-attribute
tlp: int
instance-attribute
pap: int
instance-attribute
status: str
instance-attribute
summary: str
instance-attribute
assignee: str
instance-attribute
customFields: List[InputCustomFieldValue]
instance-attribute
caseTemplate: str
instance-attribute
tasks: List[InputTask]
instance-attribute
sharingParameters: List[InputShare]
instance-attribute
taskRule: str
instance-attribute
observableRule: str
instance-attribute
attachment
OutputAttachmentRequired
Bases: TypedDict
name: str
instance-attribute
size: int
instance-attribute
contentType: str
instance-attribute
id: str
instance-attribute
OutputAttachment
Bases: OutputAttachmentRequired
hashes: List[str]
instance-attribute
case
CaseStatusValue = Literal['New', 'InProgress', 'Indeterminate', 'FalsePositive', 'TruePositive', 'Other', 'Duplicated']
module-attribute
ImpactStatusValue = Literal['NotApplicable', 'WithImpact', 'NoImpact']
module-attribute
CaseStatus
New: CaseStatusValue = 'New'
class-attribute
instance-attribute
InProgress: CaseStatusValue = 'InProgress'
class-attribute
instance-attribute
Indeterminate: CaseStatusValue = 'Indeterminate'
class-attribute
instance-attribute
FalsePositive: CaseStatusValue = 'FalsePositive'
class-attribute
instance-attribute
TruePositive: CaseStatusValue = 'TruePositive'
class-attribute
instance-attribute
Other: CaseStatusValue = 'Other'
class-attribute
instance-attribute
Duplicated: CaseStatusValue = 'Duplicated'
class-attribute
instance-attribute
ImpactStatus
NotApplicable: ImpactStatusValue = 'NotApplicable'
class-attribute
instance-attribute
WithImpact: ImpactStatusValue = 'WithImpact'
class-attribute
instance-attribute
NoImpact: ImpactStatusValue = 'NoImpact'
class-attribute
instance-attribute
InputCaseRequired
Bases: TypedDict
title: str
instance-attribute
description: str
instance-attribute
InputCase
Bases: InputCaseRequired
severity: int
instance-attribute
startDate: int
instance-attribute
endDate: int
instance-attribute
tags: List[str]
instance-attribute
flag: bool
instance-attribute
tlp: int
instance-attribute
pap: int
instance-attribute
status: CaseStatusValue
instance-attribute
summary: str
instance-attribute
assignee: str
instance-attribute
customFields: List[InputCustomFieldValue]
instance-attribute
caseTemplate: str
instance-attribute
tasks: List[InputTask]
instance-attribute
sharingParameters: List[InputShare]
instance-attribute
taskRule: str
instance-attribute
observableRule: str
instance-attribute
OutputCaseRequired
Bases: TypedDict
number: int
instance-attribute
title: str
instance-attribute
description: str
instance-attribute
severity: int
instance-attribute
startDate: int
instance-attribute
flag: bool
instance-attribute
tlp: int
instance-attribute
pap: int
instance-attribute
status: CaseStatusValue
instance-attribute
stage: str
instance-attribute
extraData: dict
instance-attribute
newDate: int
instance-attribute
timeToDetect: int
instance-attribute
OutputCase
Bases: OutputCaseRequired
endDate: int
instance-attribute
tags: List[str]
instance-attribute
summary: str
instance-attribute
impactStatus: ImpactStatusValue
instance-attribute
assignee: str
instance-attribute
customFields: List[OutputCustomFieldValue]
instance-attribute
userPermissions: List[str]
instance-attribute
inProgressDate: int
instance-attribute
closedDate: int
instance-attribute
alertDate: int
instance-attribute
alertNewDate: int
instance-attribute
alertInProgressDate: int
instance-attribute
alertImportedDate: int
instance-attribute
timeToTriage: int
instance-attribute
timeToQualify: int
instance-attribute
timeToAcknowledge: int
instance-attribute
timeToResolve: int
instance-attribute
handlingDuration: int
instance-attribute
InputUpdateCase
Bases: TypedDict
title: str
instance-attribute
description: str
instance-attribute
severity: int
instance-attribute
startDate: int
instance-attribute
endDate: int
instance-attribute
tags: List[str]
instance-attribute
flag: bool
instance-attribute
tlp: int
instance-attribute
pap: int
instance-attribute
status: str
instance-attribute
summary: str
instance-attribute
assignee: str
instance-attribute
impactStatus: str
instance-attribute
customFields: List[InputCustomFieldValue]
instance-attribute
taskRule: str
instance-attribute
observableRule: str
instance-attribute
InputBulkUpdateCase
Bases: InputUpdateCase
ids: List[str]
instance-attribute
InputImportCaseRequired
Bases: TypedDict
password: str
instance-attribute
InputImportCase
Bases: InputImportCaseRequired
sharingParameters: List[InputShare]
instance-attribute
taskRule: str
instance-attribute
observableRule: str
instance-attribute
comment
InputComment
Bases: TypedDict
message: str
instance-attribute
OutputCommentRequired
Bases: TypedDict
createdBy: str
instance-attribute
createdAt: int
instance-attribute
message: str
instance-attribute
isEdited: bool
instance-attribute
OutputComment
Bases: OutputCommentRequired
updatedAt: str
instance-attribute
InputUpdateComment
Bases: TypedDict
message: str
instance-attribute
custom_field
InputCustomFieldValueRequired
Bases: TypedDict
name: str
instance-attribute
InputCustomFieldValue
Bases: InputCustomFieldValueRequired
value: Any
instance-attribute
order: int
instance-attribute
OutputCustomFieldValue
Bases: TypedDict
name: str
instance-attribute
description: str
instance-attribute
type: str
instance-attribute
value: Any
instance-attribute
order: int
instance-attribute
InputCustomFieldRequired
Bases: TypedDict
name: str
instance-attribute
group: str
instance-attribute
description: str
instance-attribute
type: str
instance-attribute
InputCustomField
Bases: InputCustomFieldRequired
displayName: str
instance-attribute
mandatory: bool
instance-attribute
options: list
instance-attribute
OutputCustomFieldRequired
Bases: TypedDict
name: str
instance-attribute
displayName: str
instance-attribute
group: str
instance-attribute
description: str
instance-attribute
type: str
instance-attribute
mandatory: bool
instance-attribute
OutputCustomField
Bases: OutputCustomFieldRequired
options: list
instance-attribute
InputUpdateCustomField
Bases: TypedDict
displayName: str
instance-attribute
group: str
instance-attribute
description: str
instance-attribute
type: str
instance-attribute
options: list
instance-attribute
mandatory: bool
instance-attribute
observable
InputObservableRequired
Bases: TypedDict
dataType: str
instance-attribute
InputObservable
Bases: InputObservableRequired
data: str
instance-attribute
message: str
instance-attribute
startDate: int
instance-attribute
tlp: int
instance-attribute
pap: int
instance-attribute
tags: List[str]
instance-attribute
ioc: bool
instance-attribute
sighted: bool
instance-attribute
sightedAt: int
instance-attribute
ignoreSimilarity: bool
instance-attribute
isZip: bool
instance-attribute
zipPassword: bool
instance-attribute
attachment: str
instance-attribute
OutputObservableRequired
Bases: TypedDict
dataType: str
instance-attribute
startDate: int
instance-attribute
tlp: int
instance-attribute
pap: int
instance-attribute
ioc: bool
instance-attribute
sighted: bool
instance-attribute
reports: dict
instance-attribute
extraData: dict
instance-attribute
ignoreSimilarity: bool
instance-attribute
OutputObservable
Bases: OutputObservableRequired
data: str
instance-attribute
attachment: OutputAttachment
instance-attribute
tags: List[str]
instance-attribute
sightedAt: int
instance-attribute
message: str
instance-attribute
InputUpdateObservable
Bases: TypedDict
dataType: str
instance-attribute
message: str
instance-attribute
tlp: int
instance-attribute
pap: int
instance-attribute
tags: List[str]
instance-attribute
ioc: bool
instance-attribute
sighted: bool
instance-attribute
sightedAt: int
instance-attribute
ignoreSimilarity: bool
instance-attribute
InputBulkUpdateObservable
Bases: InputUpdateObservable
ids: List[str]
instance-attribute
observable_type
InputObservableTypeRequired
Bases: TypedDict
name: str
instance-attribute
InputObservableType
Bases: InputObservableTypeRequired
isAttachment: bool
instance-attribute
OutputObservableTypeRequired
Bases: TypedDict
name: str
instance-attribute
isAttachment: bool
instance-attribute
OutputObservableType
Bases: OutputObservableTypeRequired
organisation
InputOrganisationLink
Bases: TypedDict
linkType: str
instance-attribute
otherLinkType: str
instance-attribute
InputBulkOrganisationLink
Bases: TypedDict
toOrganisation: str
instance-attribute
linkType: str
instance-attribute
otherLinkType: str
instance-attribute
OutputSharingProfile
Bases: TypedDict
name: str
instance-attribute
description: str
instance-attribute
autoShare: bool
instance-attribute
editable: bool
instance-attribute
permissionProfile: str
instance-attribute
taskRule: str
instance-attribute
observableRule: str
instance-attribute
InputOrganisationRequired
Bases: TypedDict
name: str
instance-attribute
description: str
instance-attribute
InputOrganisation
Bases: InputOrganisationRequired
taskRule: str
instance-attribute
observableRule: str
instance-attribute
locked: bool
instance-attribute
OutputOrganisationRequired
Bases: TypedDict
name: str
instance-attribute
description: str
instance-attribute
taskRule: str
instance-attribute
observableRule: str
instance-attribute
locked: bool
instance-attribute
extraData: dict
instance-attribute
OutputOrganisation
Bases: OutputOrganisationRequired
links: List[InputOrganisationLink]
instance-attribute
avatar: str
instance-attribute
InputUpdateOrganisation
Bases: TypedDict
name: str
instance-attribute
description: str
instance-attribute
taskRule: str
instance-attribute
observableRule: str
instance-attribute
locked: bool
instance-attribute
avatar: str
instance-attribute
page
InputCasePageRequired
Bases: TypedDict
title: str
instance-attribute
content: str
instance-attribute
category: str
instance-attribute
InputCasePage
Bases: InputCasePageRequired
order: int
instance-attribute
OutputCasePageRequired
Bases: TypedDict
id: str
instance-attribute
createdBy: str
instance-attribute
createdAt: int
instance-attribute
title: str
instance-attribute
content: str
instance-attribute
slug: str
instance-attribute
order: int
instance-attribute
category: str
instance-attribute
OutputCasePage
Bases: OutputCasePageRequired
updatedBy: str
instance-attribute
updatedAt: int
instance-attribute
InputUpdateCasePage
Bases: TypedDict
title: str
instance-attribute
content: str
instance-attribute
category: str
instance-attribute
order: int
instance-attribute
procedure
InputProcedureRequired
Bases: TypedDict
occurDate: int
instance-attribute
patternId: str
instance-attribute
InputProcedure
Bases: InputProcedureRequired
tactic: str
instance-attribute
description: str
instance-attribute
OutputProcedureRequired
Bases: TypedDict
occurDate: int
instance-attribute
tactic: str
instance-attribute
tacticLabel: str
instance-attribute
extraData: dict
instance-attribute
OutputProcedure
Bases: OutputProcedureRequired
description: str
instance-attribute
patternId: str
instance-attribute
patternName: str
instance-attribute
InputUpdateProcedure
Bases: TypedDict
description: str
instance-attribute
occurDate: int
instance-attribute
profile
InputProfileRequired
Bases: TypedDict
name: str
instance-attribute
InputProfile
Bases: InputProfileRequired
permissions: List[str]
instance-attribute
OutputProfileRequired
Bases: TypedDict
name: str
instance-attribute
editable: bool
instance-attribute
isAdmin: bool
instance-attribute
OutputProfile
Bases: OutputProfileRequired
permissions: List[str]
instance-attribute
InputUpdateProfile
Bases: TypedDict
name: str
instance-attribute
permissions: List[str]
instance-attribute
share
OutputShareRequired
Bases: TypedDict
caseId: str
instance-attribute
profileName: str
instance-attribute
organisationName: str
instance-attribute
owner: bool
instance-attribute
taskRule: str
instance-attribute
observableRule: str
instance-attribute
OutputShare
Bases: OutputShareRequired
InputShareRequired
Bases: TypedDict
organisation: str
instance-attribute
InputShare
Bases: InputShareRequired
share: bool
instance-attribute
profile: str
instance-attribute
taskRule: str
instance-attribute
observableRule: str
instance-attribute
task
InputTaskRequired
Bases: TypedDict
title: str
instance-attribute
InputTask
Bases: InputTaskRequired
group: str
instance-attribute
description: str
instance-attribute
status: str
instance-attribute
flag: bool
instance-attribute
startDate: int
instance-attribute
endDate: int
instance-attribute
order: int
instance-attribute
dueDate: int
instance-attribute
assignee: str
instance-attribute
mandatory: bool
instance-attribute
OutputTaskRequired
Bases: TypedDict
title: str
instance-attribute
group: str
instance-attribute
status: str
instance-attribute
flag: bool
instance-attribute
order: int
instance-attribute
mandatory: bool
instance-attribute
extraData: dict
instance-attribute
OutputTask
Bases: OutputTaskRequired
description: str
instance-attribute
startDate: int
instance-attribute
endDate: int
instance-attribute
assignee: str
instance-attribute
dueDate: int
instance-attribute
InputUpdateTask
Bases: TypedDict
title: str
instance-attribute
group: str
instance-attribute
description: str
instance-attribute
status: str
instance-attribute
flag: bool
instance-attribute
startDate: int
instance-attribute
endDate: int
instance-attribute
order: int
instance-attribute
dueDate: int
instance-attribute
assignee: str
instance-attribute
mandatory: bool
instance-attribute
InputBulkUpdateTask
Bases: InputUpdateTask
ids: List[str]
instance-attribute
task_log
InputTaskLogRequired
Bases: TypedDict
message: str
instance-attribute
InputTaskLog
Bases: InputTaskLogRequired
startDate: int
instance-attribute
includeInTimeline: int
instance-attribute
OutputTaskLogRequired
Bases: TypedDict
message: str
instance-attribute
date: int
instance-attribute
owner: str
instance-attribute
extraData: dict
instance-attribute
OutputTaskLog
Bases: OutputTaskLogRequired
attachments: List[dict]
instance-attribute
includeInTimeline: int
instance-attribute
InputUpdateTaskLog
Bases: TypedDict
message: str
instance-attribute
includeInTimeline: int
instance-attribute
timeline
OutputTimelineEventRequired
Bases: TypedDict
date: int
instance-attribute
kind: str
instance-attribute
entity: str
instance-attribute
entityId: str
instance-attribute
details: dict
instance-attribute
OutputTimelineEvent
Bases: OutputTimelineEventRequired
endDate: int
instance-attribute
OutputTimeline
Bases: TypedDict
events: List[OutputTimelineEvent]
instance-attribute
InputCustomEventRequired
Bases: TypedDict
date: int
instance-attribute
title: str
instance-attribute
InputCustomEvent
Bases: InputCustomEventRequired
endDate: int
instance-attribute
description: str
instance-attribute
OutputCustomEventRequired
Bases: TypedDict
date: int
instance-attribute
title: str
instance-attribute
OutputCustomEvent
Bases: OutputCustomEventRequired
endDate: int
instance-attribute
description: str
instance-attribute
InputUpdateCustomEvent
Bases: TypedDict
date: int
instance-attribute
endDate: int
instance-attribute
title: str
instance-attribute
description: str
instance-attribute
user
InputUserRequired
Bases: TypedDict
login: str
instance-attribute
name: str
instance-attribute
profile: str
instance-attribute
InputUser
Bases: InputUserRequired
email: str
instance-attribute
password: str
instance-attribute
organisation: str
instance-attribute
type: str
instance-attribute
OutputOrganisationProfile
Bases: TypedDict
organisationId: str
instance-attribute
organisation: str
instance-attribute
profile: str
instance-attribute
OutputUserRequired
Bases: TypedDict
login: str
instance-attribute
name: str
instance-attribute
hasKey: bool
instance-attribute
hasPassword: bool
instance-attribute
hasMFA: bool
instance-attribute
locked: bool
instance-attribute
profile: str
instance-attribute
organisation: str
instance-attribute
type: str
instance-attribute
extraData: dict
instance-attribute
OutputUser
Bases: OutputUserRequired
email: str
instance-attribute
permissions: List[str]
instance-attribute
avatar: str
instance-attribute
organisations: List[OutputOrganisationProfile]
instance-attribute
defaultOrganisation: str
instance-attribute
InputUpdateUser
Bases: TypedDict
name: str
instance-attribute
organisation: str
instance-attribute
profile: str
instance-attribute
locked: bool
instance-attribute
avatar: str
instance-attribute
email: str
instance-attribute
defaultOrganisation: str
instance-attribute
InputUserOrganisationRequired
Bases: TypedDict
organisation: str
instance-attribute
profile: str
instance-attribute
InputUserOrganisation
Bases: InputUserOrganisationRequired
default: bool
instance-attribute
OutputUserOrganisation
Bases: TypedDict
organisation: str
instance-attribute
profile: str
instance-attribute
default: bool
instance-attribute
query
QueryExpr = List[Union[_FilterExpr, _SortExpr, Paginate, dict]]
module-attribute
filters
FilterExpr = _Union['_FilterBase', dict]
module-attribute
Lt(field, value)
Bases: _FilterBase
Field less than value.
Source code in thehive4py/query/filters.py
36 37 |
|
Gt(field, value)
Bases: _FilterBase
Field greater than value.
Source code in thehive4py/query/filters.py
43 44 |
|
Lte(field, value)
Bases: _FilterBase
Field less than or equal value.
Source code in thehive4py/query/filters.py
50 51 |
|
Gte(field, value)
Bases: _FilterBase
Field less than or equal value.
Source code in thehive4py/query/filters.py
57 58 |
|
Ne(field, value)
Bases: _FilterBase
Field not equal value.
Source code in thehive4py/query/filters.py
64 65 |
|
Eq(field, value)
Bases: _FilterBase
Field equal value.
Source code in thehive4py/query/filters.py
71 72 |
|
StartsWith(field, value)
Bases: _FilterBase
Field starts with value.
Source code in thehive4py/query/filters.py
78 79 |
|
EndsWith(field, value)
Bases: _FilterBase
Field ends with value.
Source code in thehive4py/query/filters.py
85 86 |
|
Id(id)
Bases: _FilterBase
FIlter by ID.
Source code in thehive4py/query/filters.py
92 93 |
|
Between(field, start, end)
Bases: _FilterBase
Field between inclusive from and exclusive to values.
Source code in thehive4py/query/filters.py
99 100 |
|
In(field, values)
Bases: _FilterBase
Field is one of the values.
Source code in thehive4py/query/filters.py
106 107 |
|
Contains(field)
Bases: _FilterBase
Object contains the field.
Source code in thehive4py/query/filters.py
113 114 |
|
Like(field, value)
Bases: _FilterBase
Field contains the value.
Source code in thehive4py/query/filters.py
120 121 |
|
Match(field, value)
Bases: _FilterBase
Field contains the value
Source code in thehive4py/query/filters.py
127 128 |
|
page
Paginate(start, end, extra_data=[])
Bases: UserDict
Source code in thehive4py/query/page.py
5 6 |
|
sort
SortExpr
Bases: UserDict
Base class for sort expressions.
__and__(other)
Source code in thehive4py/query/sort.py
7 8 |
|
__or__(other)
Source code in thehive4py/query/sort.py
10 11 |
|
Asc(field)
Bases: SortExpr
Source code in thehive4py/query/sort.py
28 29 |
|
Desc(field)
Bases: SortExpr
Source code in thehive4py/query/sort.py
33 34 |
|
errors
TheHiveError(message, response=None, *args, **kwargs)
Bases: Exception
Base error class of thehive4py.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
The exception message. |
required |
response
|
Optional[Response]
|
Either |
None
|
Source code in thehive4py/errors.py
8 9 10 11 12 13 14 15 16 17 18 19 |
|