dxlmispclient.client module

class dxlmispclient.client.MispClient(dxl_client, misp_service_unique_id=None)

Bases: dxlbootstrap.client.Client

The "MISP DXL Python client library" client wrapper class.

Constructor parameters:

Parameters:
  • dxl_client -- The DXL client to use for communication with the fabric
  • misp_service_unique_id (str) -- Unique id to use as part of the request topic names for the MISP DXL service.
add_named_attribute(event, type_value, value, **kwargs)

Adds one or more attributes to an existing event. See the documentation for the MISP REST Attribute Management API and the "add_named_attribute" method in the pymisp.PyMISP class for more information on the full set of available parameters and data format.

Parameters:
  • event (str) -- The id of the event to add the attribute to.
  • type_value (str) -- The type to associate with the attribute.
  • value -- The attribute value.
  • kwargs (dict) -- Dictionary of additional parameters to pass along to the MISP Python API.
Returns:

Result of the attribute addition attempt.

Return type:

dict

new_event(info, **kwargs)

Create and add a new event. See the documentation for the MISP REST Event Management API and the "new_event" method in the pymisp.PyMISP class for more information on the full set of available parameters and data format.

Parameters:
  • info (str) -- Info to include in the event.
  • kwargs (dict) -- Dictionary of additional parameters to pass along to the MISP Python API.
Returns:

Result of the event creation attempt.

Return type:

dict

search(**kwargs)

Search via the MISP REST API. See the documentation for the MISP REST Search API and the "search" method in the pymisp.PyMISP class for more information on the full set of available parameters and data format.

Parameters:kwargs (dict) -- Dictionary of additional parameters to pass along to the MISP Python API.
Returns:Result of the search attempt.
Return type:dict
sighting(uuid=None, id=None, **kwargs)

Set a single sighting. See the documentation for the MISP REST Sighting API and the "search" method in the pymisp.PyMISP class for more information on the full set of available parameters and data format.

Parameters:
  • uuid (str) -- UUID of the attribute to update
  • id (str) -- ID of the attribute to update
  • kwargs (dict) -- Dictionary of additional parameters to pass along to the MISP Python API.
Returns:

Result of the attribute addition attempt.

Return type:

dict

tag(uuid, tag)

Tag an object (event or attribute). See the documentation for the MISP REST Tag Management API and the "tag" method in the pymisp.PyMISP class for more information on the full set of available parameters and data format.

Parameters:
  • uuid (str) -- UUID of the object to update
  • id (str) -- ID of the object to update
Returns:

Result of the tag attempt.

Return type:

dict