API Documentation
enrichment
Handle enrichment requests for a specific observable (domain or IP address).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object containing query parameters. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
A JSON response indicating whether the observable was found, |
|
and if so, the corresponding IOC. |
Source code in docs/Submodules/GreedyBear/api/views.py
feeds
Handle requests for IOC feeds with specific parameters and format the response accordingly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required | |
feed_type
|
str
|
Type of feed (e.g., log4j, cowrie, etc.). |
required |
attack_type
|
str
|
Type of attack (e.g., all, specific attack types). |
required |
age
|
str
|
Age of the data to filter (e.g., recent, persistent). |
required |
format_
|
str
|
Desired format of the response (e.g., json, csv, txt). |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
The HTTP response with formatted IOC data. |
Source code in docs/Submodules/GreedyBear/api/views.py
feeds_pagination
Handle requests for paginated IOC feeds based on query parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
The paginated HTTP response with IOC data. |
Source code in docs/Submodules/GreedyBear/api/views.py
Statistics
Bases: ViewSet
A viewset for viewing and editing statistics related to feeds and enrichment data.
Provides actions to retrieve statistics about the sources and downloads of feeds, as well as statistics on enrichment data.
Source code in docs/Submodules/GreedyBear/api/views.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 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 338 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 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 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 415 416 |
|
__aggregation_response_static_ioc(annotations)
Helper method to generate IOC response based on annotations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
annotations
|
dict
|
Dictionary containing the annotations for the query. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
Response
|
A JSON response containing the aggregated IOC data. |
Source code in docs/Submodules/GreedyBear/api/views.py
__aggregation_response_static_statistics(annotations)
Helper method to generate statistics response based on annotations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
annotations
|
dict
|
Dictionary containing the annotations for the query. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
Response
|
A JSON response containing the aggregated statistics. |
Source code in docs/Submodules/GreedyBear/api/views.py
__parse_range(request)
staticmethod
Parse the range parameter from the request query string to determine the time range for the query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required |
Returns:
Name | Type | Description |
---|---|---|
tuple |
A tuple containing the delta time and basis for the query range. |
Source code in docs/Submodules/GreedyBear/api/views.py
enrichment(request, pk=None)
Retrieve enrichment statistics, including the number of sources and requests.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required | |
pk
|
str
|
The type of statistics to retrieve (e.g., "sources", "requests"). |
None
|
Returns:
Name | Type | Description |
---|---|---|
Response |
A JSON response containing the requested statistics. |
Source code in docs/Submodules/GreedyBear/api/views.py
feeds(request, pk=None)
Retrieve feed statistics, including the number of sources and downloads.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required | |
pk
|
str
|
The type of statistics to retrieve (e.g., "sources", "downloads"). |
None
|
Returns:
Name | Type | Description |
---|---|---|
Response |
A JSON response containing the requested statistics. |
Source code in docs/Submodules/GreedyBear/api/views.py
feeds_types(request)
Retrieve statistics for different types of feeds, including Log4j, Cowrie, and general honeypots.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
A JSON response containing the feed type statistics. |
Source code in docs/Submodules/GreedyBear/api/views.py
general_honeypot_list
Retrieve a list of all general honeypots, optionally filtering by active status.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
The incoming request object containing query parameters. |
required |
Returns:
Name | Type | Description |
---|---|---|
Response |
A JSON response containing the list of general honeypots. |