b1tdc Class¶
- class bloxone.b1tdc(cfg_file='config.ini', api_key='', url='https://csp.infoblox.com', api_version='v1')[source]¶
BloxOne ThreatDefence Cloud API Wrapper
- add_items_to_custom_list(name='', items=[], items_described=[])[source]¶
Add items to an existing custom list
- Parameters
name (str) – Name of custom list
items (list) – List of indicators
items_described (list) – List of {“description”: “”, “item”: “”}
Note
For updates both items and items_described can be included.
- Returns
Requests response object
- Return type
response object
- create(objpath, body='')[source]¶
Generic create object wrapper for Threat Defense Cloud
- Parameters
objpath (str) – Swagger object path
body (str) – JSON formatted data payload
- Returns
Requests response object
- Return type
response object
- create_custom_list(name='', confidence='HIGH', items=[], items_described=[])[source]¶
Create deny custom lists
- Parameters
name (str) – Name of custom list
confidence (str) – Confidence level
items (list) – List of indicators
items_described (list) – List of {“description”: “”, “item”: “”}
Note
if items and items_described are both included items_described will take precidence.
- Returns
Requests response object
- Return type
response object
- delete(objpath, id='', body='')[source]¶
Generic delete object wrapper for Threat Defense Cloud
- Parameters
objpath (str) – Swagger object path
id (str) – Object id to delete
body (str) – JSON formatted data payload
- Returns
Requests response object
- Return type
response object
- delete_custom_lists(names=[])[source]¶
Delete custom list
- Parameters
name (list) – List of names(str) to delete
- Returns
Requests response object or None
- Return type
response object
- delete_items_from_custom_list(name='', items=[], items_described=[])[source]¶
Delete items to an existing custom list
- Parameters
name (str) – Name of custom list
items (list) – List of indicators
items_described (list) – List of {“description”: “”, “item”: “”}
Note
For updates both items and items_described can be included.
- Returns
Requests response object
- Return type
response object
- get(objpath, id='', action='', **params)[source]¶
Generic get object wrapper for Threat Defense Cloud
- Parameters
objpath (str) – Swagger object path
action (str) – Optional object action
- Returns
Requests response object
- Return type
response object
- get_custom_list(name='', **params)[source]¶
Get the named custom list
- Parameters
name (str) – Name of custom list
- Returns
Requests response object
- Return type
response object
- get_custom_lists(**params)[source]¶
Get custom lists
- Parameters
documentation (Additional parameters per API) –
- Returns
Requests response object
- Return type
response object
- get_id(objpath, *, key='', value='', include_path=False)[source]¶
Get object id using key/value pair
- Parameters
objpath (str) – Swagger object path
key (str) – name of key to match
value (str) – value to match
- Returns
object id or “”
- Return type
id (str)
- get_object_by_key(objpath, *, key='', value='', include_path=False)[source]¶
Get object using key/value pair
- Parameters
objpath (str) – Swagger object path
key (str) – name of key to match
value (str) – value to match
- Returns
object id or “”
- Return type
id (str)
- post(objpath, body='')[source]¶
Generic create object wrapper for Threat Defense Cloud
- Parameters
objpath (str) – Swagger object path
body (str) – JSON formatted data payload
- Returns
Requests response object
- Return type
response object