SearchParams¶
-
class
pytw.search_params.
SearchParams
(window_start=None, window_end=None, offset=None, limit=None)[source]¶ SearchParams object
Parameters: - window_start – Number of days in the past to start search. Default is 1 day ago.
- window_end – Number of days in the past to end search. Default is 0 i.e. today.
- offset – Offset in result set. Used for pagination. Default is to start from first record.
- limit – Number of records to be returned. Used for pagination. Default is all records.
-
add_asset_ids_filter
(asset_ids_list)[source]¶ Parameters: asset_ids_list – A list of asset IDs to filter on.
-
add_asset_locations_filter
(locations_list)[source]¶ Parameters: locations_list – A list of locations to filter by.
-
add_asset_names_filter
(names_list)[source]¶ Parameters: names_list – A list of asset names to filter by.
-
add_asset_product_filter
(product)[source]¶ Parameters: product – Filter assets containing specified product
-
add_asset_types_filter
(types_list)[source]¶ Parameters: types_list – A list of asset types to filter by.
-
add_free_text_search_filter
(search_text)[source]¶ Search_text: The text to be searched on. For vulns, it applies to vuln IDs, title, summary or affected products. For impacts, it applies to asset IDs, asset names, vuln IDs or affected products.
-
add_impact_status_filter
(status_list)[source]¶ Parameters: status_list – A list of impact_status.Status enum values to filter by.
-
add_products_filter
(products_list)[source]¶ Parameters: products_list – A list of products to filter on.
-
add_publishers_filter
(publishers_list)[source]¶ Parameters: publishers_list – A list of publishers to filter on.
-
add_ratings_filter
(ratings_list)[source]¶ Parameters: ratings_list – A list of rating.Rating enum values to filter on.
-
add_threshold_filter
(threshold)[source]¶ Parameters: threshold – Return only results which cross the threshold. For Vulns, get vulnerabilities with relevance greater than or equal to threshold. For Impacts, get impact with confidence values greater than or equal to threshold.