Watchlists (DEPRECATED)
Warning
Incydr functionality is deprecated. Use the resources at https://developer.code42.com/ instead.
- class py42.clients.watchlists.WatchlistType
Bases:
ChoicesConstants available for setting the type of watchlist.
CONTRACT_EMPLOYEEDEPARTING_EMPLOYEEELEVATED_ACCESS_PRIVILEGESFLIGHT_RISKHIGH_IMPACT_EMPLOYEENEW_EMPLOYEEPERFORMANCE_CONCERNSPOOR_SECURITY_PRACTICESSUSPICIOUS_SYSTEM_ACTIVITYCUSTOM
- class py42.clients.watchlists.WatchlistsClient(watchlists_service)
Bases:
objectA client to expose the watchlists API.
- add_included_users_by_watchlist_id(user_ids, watchlist_id)
Explicitly include users on a watchlist.
- Parameters:
user_ids (list(str) – A list of user IDs to add to the watchlist
watchlist_id (str) – A unique watchlist ID.
- Returns:
- add_included_users_by_watchlist_type(user_ids, watchlist_type)
Explicitly include users on a watchlist.
- Parameters:
user_ids (list(str) – A list of user IDs to add to the watchlist
watchlist_type (str) – Type of watchlist. Constants available at
py42.constants.WatchlistType.
- Returns:
- create(watchlist_type, title=None, description=None)
Create a new watchlist.
- Parameters:
watchlist_type (str) – Type of watchlist. Constants available at
py42.constants.WatchlistType.title (str, optional) – Name of watchlist (for CUSTOM watchlists only).
description (str, optional) – Description of watchlist (for CUSTOM watchlists only).
- Returns:
- delete(watchlist_id)
Delete a watchlist.
- Parameters:
watchlist_id (str) – A unique watchlist ID.
- Returns:
- get(watchlist_id)
Get a watchlist.
- Parameters:
watchlist_id (str) – A unique watchlist ID.
- Returns:
- get_all()
Get all watchlists.
- Returns:
An object that iterates over
py42.response.Py42Responseobjects that each contain a page of watchlists.- Return type:
generator
- get_all_included_users(watchlist_id)
Get all users explicitly included on a watchlist.
- Parameters:
watchlist_id (str) – A unique watchlist ID.
- Returns:
An object that iterates over
py42.response.Py42Responseobjects that each contain a page of included users that match the given query.- Return type:
generator
- get_all_watchlist_members(watchlist_id)
Get all members of a watchlist.
- Parameters:
watchlist_id (str) – A unique watchlist ID.
- Returns:
An object that iterates over
py42.response.Py42Responseobjects that each contain a page of watchlist members.- Return type:
generator
- get_watchlist_member(watchlist_id, user_id)
Get a member of a watchlist.
- Parameters:
watchlist_id (str) – A unique watchlist ID.
user_id (str) – A unique user ID.
- Returns:
- remove_included_users_by_watchlist_id(user_ids, watchlist_id)
Remove users that are explicitly included on a watchlist.
- Parameters:
user_ids (list(str) – A list of user IDs to remove from the watchlist
watchlist_id (str) – A unique watchlist ID.
- Returns:
- remove_included_users_by_watchlist_type(user_ids, watchlist_type)
Remove users that are explicitly included on a watchlist.
- Parameters:
user_ids (list(str) – A list of user IDs to remove from the watchlist
watchlist_type (str) – Type of watchlist. Constants available at
py42.constants.WatchlistType.
- Returns: