sym.sdk.integrations.knowbe4¶
Helpers for interacting with the KnowBe4 API within the Sym SDK.
Functions
|
Gets all training enrollments for the given user, optionally filtered by |
|
Whether the user exists in the group with the specified |
- sym.sdk.integrations.knowbe4.get_training_enrollments_for_user(user: sym.sdk.user.User, store_purchase_id: Optional[int] = None, campaign_id: Optional[int] = None) List[dict] ¶
Gets all training enrollments for the given user, optionally filtered by
store_purchase_id
andcampaign_id
. Refer to the KnowBe4 API docs for more details.- Parameters
user – The
User
whose training enrollments to retrieve.store_purchase_id – ID for store purchase by which to filter the training enrollments.
campaign_id – ID for training campaign by which to filter the training enrollments.
- Returns
A list of all training enrollments.
- Raises
KnowBe4Error – If the KnowBe4 API responds with a 4xx or 5xx status code.
- sym.sdk.integrations.knowbe4.is_user_in_group(user: sym.sdk.user.User, group_id: int) bool ¶
Whether the user exists in the group with the specified
group_id
. Refer to the API docs for more details.- Returns
A boolean indicating if the user is in the group.
- Raises
KnowBe4Error – If no corresponding KnowBe4 user is found, or if the KnowBe4 API responds with a 4xx or 5xx status code.