Skip to content

Departments

class _incydr_sdk.departments.client.DepartmentsV1(parent)

Client for /v1/departments endpoints.

Usage example:

>>> import incydr
>>> client = incydr.Client(**kwargs)
>>> client.departments.v1.get_page()
get_page(self, page_num=1, page_size=None, name=None)

Get a page of departments. Retrieves department information that has been pushed to Code42 from SCIM or User Directory Sync. The resulting department names can be used to include departments on watchlists.

Parameters:

  • page_num: int - Page number for results, starting at 1.
  • page_size: int - Max number of results to return for a page.
  • user_id: str - Matches departments whose name is like the given value.

Returns: A DepartmentsPage object.

iter_all(self, page_size=None, name=None)

Iterate over all departments.

Accepts the same parameters as .get_page() excepting page_num.

Returns: A generator yielding individual department names (str).