Actors¶
Actors are identities that generate events collected by Incydr. User cloud accounts are consolidated into a single actor through adoption, which tie related actors to one parent actor. These actor APIs can be used to retrieve information about actors and their relationships, and also manage adoption.
_incydr_sdk.actors.client.ActorsV1
(parent)Client for /v1/actors
endpoints.
Usage example:
>>> import incydr
>>> client = incydr.Client(**kwargs)
>>> client.actors.v1.get_page()
get_actor_by_id
(self, actor_id, prefer_parent=False)Get an actor by their actor ID.
Parameters:
- actor_id:
str
(required) - Unique ID for the actor. - prefer_parent:
str
- Returns an actor's parent when applicable. Returns an actor themselves if they have no parent.
Returns: An Actor
object representing the actor.
get_actor_by_name
(self, name, prefer_parent=False)Get an actor by their name.
Parameters:
- name:
str
(required) - The actor name. - prefer_parent:
str
- Returns an actor's parent when applicable. Returns an actor themselves if they have no parent.
Returns: An Actor
object representing the actor.
get_family_by_member_id
(self, actor_id)Get an actor family from the actor ID of any family member.
Parameters:
- actor_id:
str
(required) - Unique ID for an actor.
Returns: An [Actor Family
][actor-family-model] object representing the family of actors.
get_family_by_member_name
(self, name)Get an actor family from the name of any family member.
Parameters:
- name:
str
(required) - Name of an actor.
Returns: An [ActorFamily
][actor-family-model] object representing the family of actors.
get_page
(self, active=None, name_starts_with=None, name_ends_with=None, page_num=1, page_size=500, prefer_parent=False)Get a page of actors.
Filter results by passing the appropriate parameters:
Parameters:
- active:
bool
- Find actors with the given active state. WhenTrue
, returns only active actors. WhenFalse
returns only inactive actors. Defaults toNone
, returning both. - name_starts_with:
str
- Find actors whose name (e.g. username/email) starts with this text, ignoring case. - name_ends_with:
str
- Find actors whose name (e.g. username/email) ends with this text, ignoring case. - page_num:
int
- Page number for results, starting at 1. - page_size:
int
- Max number of results to return per page. Must be between 1 and 500. Defaults to 500. - prefer_parent:
bool
= Returns an actor's parent when applicable. Returns an actor themselves if they have no parent.
Returns: An Actor
object representing the actor.
iter_all
(self, active=None, name_starts_with=None, name_ends_with=None, page_size=500, prefer_parent=False)Iterate over all actors.
Accepts the same parameters as .get_page()
excepting page_num
.
Returns: A generator yielding individual Actor
objects.
update_actor
(self, actor, notes=None, start_date=None, end_date=None)Update an actor.
Parameters:
Either:
- actor:
str
(required) - Unique ID for an actor. - notes:
str
- Additional notes for the risk profile. Pass an empty string to clear the field. - start_date:
datetime
- The starting date for the user. Accepts a datetime object or a string in the format yyyy-MM-dd (UTC) format. Pass an empty string to clear the field. - end_date:
datetime
- The departure date for the user. Accepts a datetime object or a string in the format yyyy-MM-dd (UTC) format. Pass an empty string to clear the field.
Or:
- actor: An
Actor
object representing the actor.
Returns: An Actor
object representing the actor.