enterprise.api.v1 package#
Subpackages#
- enterprise.api.v1.views package
- Submodules
- enterprise.api.v1.views.analytics_summary module
- enterprise.api.v1.views.base_views module
- enterprise.api.v1.views.coupon_codes module
CouponCodesViewCouponCodesView.MISSING_REQUIRED_PARAMS_MSGCouponCodesView.OPTIONAL_PARAM_NOTESCouponCodesView.OPTIONAL_PARAM_NUMBER_OF_CODESCouponCodesView.REQUIRED_PARAM_EMAILCouponCodesView.REQUIRED_PARAM_ENTERPRISE_NAMECouponCodesView.authentication_classesCouponCodesView.get_missing_params_message()CouponCodesView.get_required_query_params()CouponCodesView.permission_classesCouponCodesView.post()CouponCodesView.throttle_classes
- enterprise.api.v1.views.default_enterprise_enrollments module
DefaultEnterpriseEnrollmentIntentionViewSetDefaultEnterpriseEnrollmentIntentionViewSet.allowed_rolesDefaultEnterpriseEnrollmentIntentionViewSet.base_querysetDefaultEnterpriseEnrollmentIntentionViewSet.basenameDefaultEnterpriseEnrollmentIntentionViewSet.descriptionDefaultEnterpriseEnrollmentIntentionViewSet.detailDefaultEnterpriseEnrollmentIntentionViewSet.get_permission_object()DefaultEnterpriseEnrollmentIntentionViewSet.learner_status()DefaultEnterpriseEnrollmentIntentionViewSet.list_lookup_fieldDefaultEnterpriseEnrollmentIntentionViewSet.nameDefaultEnterpriseEnrollmentIntentionViewSet.permission_requiredDefaultEnterpriseEnrollmentIntentionViewSet.requested_enterprise_customer_uuidDefaultEnterpriseEnrollmentIntentionViewSet.requested_lms_user_idDefaultEnterpriseEnrollmentIntentionViewSet.serializer_classDefaultEnterpriseEnrollmentIntentionViewSet.suffixDefaultEnterpriseEnrollmentIntentionViewSet.user_for_learner_status
- enterprise.api.v1.views.enterprise_admin_members module
EnterpriseAdminMembersPaginationEnterpriseAdminMembersViewSetEnterpriseAdminMembersViewSet.basenameEnterpriseAdminMembersViewSet.descriptionEnterpriseAdminMembersViewSet.detailEnterpriseAdminMembersViewSet.filter_backendsEnterpriseAdminMembersViewSet.get_queryset()EnterpriseAdminMembersViewSet.list()EnterpriseAdminMembersViewSet.nameEnterpriseAdminMembersViewSet.orderingEnterpriseAdminMembersViewSet.ordering_fieldsEnterpriseAdminMembersViewSet.pagination_classEnterpriseAdminMembersViewSet.permission_classesEnterpriseAdminMembersViewSet.serializer_classEnterpriseAdminMembersViewSet.suffix
- enterprise.api.v1.views.enterprise_catalog_query module
EnterpriseCatalogQueryViewSetEnterpriseCatalogQueryViewSet.authentication_classesEnterpriseCatalogQueryViewSet.basenameEnterpriseCatalogQueryViewSet.descriptionEnterpriseCatalogQueryViewSet.detailEnterpriseCatalogQueryViewSet.nameEnterpriseCatalogQueryViewSet.pagination_classEnterpriseCatalogQueryViewSet.permission_classesEnterpriseCatalogQueryViewSet.querysetEnterpriseCatalogQueryViewSet.serializer_classEnterpriseCatalogQueryViewSet.suffix
ExpandDefaultPageSize
- enterprise.api.v1.views.enterprise_course_enrollment module
EnterpriseCourseEnrollmentAdminPaginationEnterpriseCourseEnrollmentAdminViewSetEnterpriseCourseEnrollmentAdminViewSet.basenameEnterpriseCourseEnrollmentAdminViewSet.descriptionEnterpriseCourseEnrollmentAdminViewSet.detailEnterpriseCourseEnrollmentAdminViewSet.get_enterprise_course_enrollments()EnterpriseCourseEnrollmentAdminViewSet.nameEnterpriseCourseEnrollmentAdminViewSet.pagination_classEnterpriseCourseEnrollmentAdminViewSet.permission_classesEnterpriseCourseEnrollmentAdminViewSet.querysetEnterpriseCourseEnrollmentAdminViewSet.serializer_classEnterpriseCourseEnrollmentAdminViewSet.suffix
EnterpriseCourseEnrollmentPaginationEnterpriseCourseEnrollmentViewSetEnterpriseCourseEnrollmentViewSet.FIELDSEnterpriseCourseEnrollmentViewSet.USER_ID_FILTEREnterpriseCourseEnrollmentViewSet.basenameEnterpriseCourseEnrollmentViewSet.descriptionEnterpriseCourseEnrollmentViewSet.detailEnterpriseCourseEnrollmentViewSet.filter_backendsEnterpriseCourseEnrollmentViewSet.filterset_fieldsEnterpriseCourseEnrollmentViewSet.get_queryset()EnterpriseCourseEnrollmentViewSet.get_serializer_class()EnterpriseCourseEnrollmentViewSet.nameEnterpriseCourseEnrollmentViewSet.ordering_fieldsEnterpriseCourseEnrollmentViewSet.pagination_classEnterpriseCourseEnrollmentViewSet.querysetEnterpriseCourseEnrollmentViewSet.suffix
PaginatorWithOptimizedCountread_replica_or_default()
- enterprise.api.v1.views.enterprise_customer module
EnterpriseCustomerViewSetEnterpriseCustomerViewSet.FIELDSEnterpriseCustomerViewSet.USER_ID_FILTEREnterpriseCustomerViewSet.basenameEnterpriseCustomerViewSet.basic_list()EnterpriseCustomerViewSet.contains_content_items()EnterpriseCustomerViewSet.course_enrollments()EnterpriseCustomerViewSet.create()EnterpriseCustomerViewSet.dashboard_list()EnterpriseCustomerViewSet.descriptionEnterpriseCustomerViewSet.detailEnterpriseCustomerViewSet.enroll_learners_in_courses()EnterpriseCustomerViewSet.filterset_fieldsEnterpriseCustomerViewSet.get_permissions()EnterpriseCustomerViewSet.get_queryset()EnterpriseCustomerViewSet.get_serializer_class()EnterpriseCustomerViewSet.nameEnterpriseCustomerViewSet.ordering_fieldsEnterpriseCustomerViewSet.pagination_classEnterpriseCustomerViewSet.partial_update()EnterpriseCustomerViewSet.querysetEnterpriseCustomerViewSet.serializer_classEnterpriseCustomerViewSet.suffixEnterpriseCustomerViewSet.support_tool()EnterpriseCustomerViewSet.throttle_classesEnterpriseCustomerViewSet.toggle_universal_link()EnterpriseCustomerViewSet.unlink_self()EnterpriseCustomerViewSet.unlink_users()EnterpriseCustomerViewSet.with_access_to()
- enterprise.api.v1.views.enterprise_customer_admin module
EnterpriseCustomerAdminPaginationEnterpriseCustomerAdminViewSetEnterpriseCustomerAdminViewSet.basenameEnterpriseCustomerAdminViewSet.complete_tour_flow()EnterpriseCustomerAdminViewSet.create_admin_by_email()EnterpriseCustomerAdminViewSet.delete_admin()EnterpriseCustomerAdminViewSet.descriptionEnterpriseCustomerAdminViewSet.detailEnterpriseCustomerAdminViewSet.get_queryset()EnterpriseCustomerAdminViewSet.invite_admins()EnterpriseCustomerAdminViewSet.nameEnterpriseCustomerAdminViewSet.pagination_classEnterpriseCustomerAdminViewSet.permission_classesEnterpriseCustomerAdminViewSet.querysetEnterpriseCustomerAdminViewSet.serializer_classEnterpriseCustomerAdminViewSet.suffix
- enterprise.api.v1.views.enterprise_customer_api_credentials module
APICredEnabledPermissionAPICredentialsRegenerateViewSetAPICredentialsRegenerateViewSet.basenameAPICredentialsRegenerateViewSet.descriptionAPICredentialsRegenerateViewSet.detailAPICredentialsRegenerateViewSet.get_queryset()APICredentialsRegenerateViewSet.get_serializer_class()APICredentialsRegenerateViewSet.nameAPICredentialsRegenerateViewSet.permission_classesAPICredentialsRegenerateViewSet.suffixAPICredentialsRegenerateViewSet.update()
APICredentialsViewSetAPICredentialsViewSet.basenameAPICredentialsViewSet.create()APICredentialsViewSet.descriptionAPICredentialsViewSet.destroy()APICredentialsViewSet.detailAPICredentialsViewSet.get_queryset()APICredentialsViewSet.get_serializer_class()APICredentialsViewSet.nameAPICredentialsViewSet.permission_classesAPICredentialsViewSet.retrieve()APICredentialsViewSet.suffixAPICredentialsViewSet.update()
- enterprise.api.v1.views.enterprise_customer_branding_configuration module
EnterpriseCustomerBrandingConfigurationViewSetEnterpriseCustomerBrandingConfigurationViewSet.FIELDSEnterpriseCustomerBrandingConfigurationViewSet.USER_ID_FILTEREnterpriseCustomerBrandingConfigurationViewSet.basenameEnterpriseCustomerBrandingConfigurationViewSet.descriptionEnterpriseCustomerBrandingConfigurationViewSet.detailEnterpriseCustomerBrandingConfigurationViewSet.filterset_fieldsEnterpriseCustomerBrandingConfigurationViewSet.lookup_fieldEnterpriseCustomerBrandingConfigurationViewSet.nameEnterpriseCustomerBrandingConfigurationViewSet.ordering_fieldsEnterpriseCustomerBrandingConfigurationViewSet.parser_classesEnterpriseCustomerBrandingConfigurationViewSet.permission_classesEnterpriseCustomerBrandingConfigurationViewSet.querysetEnterpriseCustomerBrandingConfigurationViewSet.serializer_classEnterpriseCustomerBrandingConfigurationViewSet.suffixEnterpriseCustomerBrandingConfigurationViewSet.update_branding()
- enterprise.api.v1.views.enterprise_customer_catalog module
EnterpriseCustomerCatalogViewSetEnterpriseCustomerCatalogViewSet.FIELDSEnterpriseCustomerCatalogViewSet.USER_ID_FILTEREnterpriseCustomerCatalogViewSet.basenameEnterpriseCustomerCatalogViewSet.contains_content_items()EnterpriseCustomerCatalogViewSet.course_detail()EnterpriseCustomerCatalogViewSet.course_run_detail()EnterpriseCustomerCatalogViewSet.descriptionEnterpriseCustomerCatalogViewSet.detailEnterpriseCustomerCatalogViewSet.filterset_fieldsEnterpriseCustomerCatalogViewSet.get_serializer_class()EnterpriseCustomerCatalogViewSet.list()EnterpriseCustomerCatalogViewSet.nameEnterpriseCustomerCatalogViewSet.ordering_fieldsEnterpriseCustomerCatalogViewSet.program_detail()EnterpriseCustomerCatalogViewSet.querysetEnterpriseCustomerCatalogViewSet.renderer_classesEnterpriseCustomerCatalogViewSet.retrieve()EnterpriseCustomerCatalogViewSet.suffix
EnterpriseCustomerCatalogWriteViewSetEnterpriseCustomerCatalogWriteViewSet.basenameEnterpriseCustomerCatalogWriteViewSet.create()EnterpriseCustomerCatalogWriteViewSet.descriptionEnterpriseCustomerCatalogWriteViewSet.detailEnterpriseCustomerCatalogWriteViewSet.has_enterprise_customer_catalog()EnterpriseCustomerCatalogWriteViewSet.nameEnterpriseCustomerCatalogWriteViewSet.partial_update()EnterpriseCustomerCatalogWriteViewSet.permission_classesEnterpriseCustomerCatalogWriteViewSet.querysetEnterpriseCustomerCatalogWriteViewSet.serializer_classEnterpriseCustomerCatalogWriteViewSet.suffix
- enterprise.api.v1.views.enterprise_customer_invite_key module
EnterpriseCustomerInviteKeyViewSetEnterpriseCustomerInviteKeyViewSet.authentication_classesEnterpriseCustomerInviteKeyViewSet.basenameEnterpriseCustomerInviteKeyViewSet.basic_list()EnterpriseCustomerInviteKeyViewSet.create()EnterpriseCustomerInviteKeyViewSet.descriptionEnterpriseCustomerInviteKeyViewSet.destroy()EnterpriseCustomerInviteKeyViewSet.detailEnterpriseCustomerInviteKeyViewSet.filter_backendsEnterpriseCustomerInviteKeyViewSet.get_serializer_class()EnterpriseCustomerInviteKeyViewSet.http_method_namesEnterpriseCustomerInviteKeyViewSet.link_user()EnterpriseCustomerInviteKeyViewSet.list()EnterpriseCustomerInviteKeyViewSet.nameEnterpriseCustomerInviteKeyViewSet.partial_update()EnterpriseCustomerInviteKeyViewSet.permission_classesEnterpriseCustomerInviteKeyViewSet.querysetEnterpriseCustomerInviteKeyViewSet.retrieve()EnterpriseCustomerInviteKeyViewSet.suffix
- enterprise.api.v1.views.enterprise_customer_members module
EnterpriseCustomerMembersPaginatorEnterpriseCustomerMembersViewSetEnterpriseCustomerMembersViewSet.basenameEnterpriseCustomerMembersViewSet.descriptionEnterpriseCustomerMembersViewSet.detailEnterpriseCustomerMembersViewSet.get_members()EnterpriseCustomerMembersViewSet.nameEnterpriseCustomerMembersViewSet.paginatorEnterpriseCustomerMembersViewSet.permission_classesEnterpriseCustomerMembersViewSet.querysetEnterpriseCustomerMembersViewSet.serializer_classEnterpriseCustomerMembersViewSet.suffix
- enterprise.api.v1.views.enterprise_customer_reporting module
EnterpriseCustomerReportTypesViewEnterpriseCustomerReportingConfigurationViewSetEnterpriseCustomerReportingConfigurationViewSet.FIELDSEnterpriseCustomerReportingConfigurationViewSet.USER_ID_FILTEREnterpriseCustomerReportingConfigurationViewSet.basenameEnterpriseCustomerReportingConfigurationViewSet.create()EnterpriseCustomerReportingConfigurationViewSet.descriptionEnterpriseCustomerReportingConfigurationViewSet.destroy()EnterpriseCustomerReportingConfigurationViewSet.detailEnterpriseCustomerReportingConfigurationViewSet.filterset_fieldsEnterpriseCustomerReportingConfigurationViewSet.list()EnterpriseCustomerReportingConfigurationViewSet.lookup_fieldEnterpriseCustomerReportingConfigurationViewSet.nameEnterpriseCustomerReportingConfigurationViewSet.ordering_fieldsEnterpriseCustomerReportingConfigurationViewSet.partial_update()EnterpriseCustomerReportingConfigurationViewSet.permission_classesEnterpriseCustomerReportingConfigurationViewSet.querysetEnterpriseCustomerReportingConfigurationViewSet.retrieve()EnterpriseCustomerReportingConfigurationViewSet.serializer_classEnterpriseCustomerReportingConfigurationViewSet.suffixEnterpriseCustomerReportingConfigurationViewSet.update()
- enterprise.api.v1.views.enterprise_customer_sso_configuration module
EnterpriseCustomerInactiveExceptionEnterpriseCustomerSsoConfigurationViewSetEnterpriseCustomerSsoConfigurationViewSet.basenameEnterpriseCustomerSsoConfigurationViewSet.create()EnterpriseCustomerSsoConfigurationViewSet.descriptionEnterpriseCustomerSsoConfigurationViewSet.destroy()EnterpriseCustomerSsoConfigurationViewSet.detailEnterpriseCustomerSsoConfigurationViewSet.list()EnterpriseCustomerSsoConfigurationViewSet.nameEnterpriseCustomerSsoConfigurationViewSet.oauth_orchestration_complete()EnterpriseCustomerSsoConfigurationViewSet.permission_classesEnterpriseCustomerSsoConfigurationViewSet.querysetEnterpriseCustomerSsoConfigurationViewSet.retrieve()EnterpriseCustomerSsoConfigurationViewSet.serializer_classEnterpriseCustomerSsoConfigurationViewSet.suffixEnterpriseCustomerSsoConfigurationViewSet.update()
EntityIdNotFoundErrorSsoConfigurationApiErrorcheck_user_part_of_customer()fetch_configuration_record()fetch_entity_id_from_metadata_xml()fetch_request_data_from_request()get_customer_from_request()get_metadata_xml_from_url()
- enterprise.api.v1.views.enterprise_customer_support module
EnterpriseCustomerSupportPaginatorEnterpriseCustomerSupportViewSetEnterpriseCustomerSupportViewSet.basenameEnterpriseCustomerSupportViewSet.descriptionEnterpriseCustomerSupportViewSet.detailEnterpriseCustomerSupportViewSet.filter_backendsEnterpriseCustomerSupportViewSet.filter_queryset_by_user_query()EnterpriseCustomerSupportViewSet.nameEnterpriseCustomerSupportViewSet.ordering_fieldsEnterpriseCustomerSupportViewSet.paginatorEnterpriseCustomerSupportViewSet.permission_classesEnterpriseCustomerSupportViewSet.querysetEnterpriseCustomerSupportViewSet.retrieve()EnterpriseCustomerSupportViewSet.suffix
- enterprise.api.v1.views.enterprise_customer_user module
EnterpriseCustomerUserViewSetEnterpriseCustomerUserViewSet.FIELDSEnterpriseCustomerUserViewSet.basenameEnterpriseCustomerUserViewSet.descriptionEnterpriseCustomerUserViewSet.detailEnterpriseCustomerUserViewSet.filter_backendsEnterpriseCustomerUserViewSet.filterset_fieldsEnterpriseCustomerUserViewSet.get_serializer_class()EnterpriseCustomerUserViewSet.nameEnterpriseCustomerUserViewSet.ordering_fieldsEnterpriseCustomerUserViewSet.pagination_classEnterpriseCustomerUserViewSet.querysetEnterpriseCustomerUserViewSet.suffix
- enterprise.api.v1.views.enterprise_group module
EnterpriseGroupViewSetEnterpriseGroupViewSet.assign_learners()EnterpriseGroupViewSet.basenameEnterpriseGroupViewSet.create()EnterpriseGroupViewSet.descriptionEnterpriseGroupViewSet.detailEnterpriseGroupViewSet.filter_backendsEnterpriseGroupViewSet.get_learners()EnterpriseGroupViewSet.get_queryset()EnterpriseGroupViewSet.nameEnterpriseGroupViewSet.permission_classesEnterpriseGroupViewSet.querysetEnterpriseGroupViewSet.queryset_with_removedEnterpriseGroupViewSet.remove_learners()EnterpriseGroupViewSet.serializer_classEnterpriseGroupViewSet.suffixEnterpriseGroupViewSet.update()EnterpriseGroupViewSet.update_pending_learner_status()
remove_group_membership_records()
- enterprise.api.v1.views.enterprise_group_membership module
EnterpriseGroupMembershipViewSetEnterpriseGroupMembershipViewSet.basenameEnterpriseGroupMembershipViewSet.descriptionEnterpriseGroupMembershipViewSet.detailEnterpriseGroupMembershipViewSet.filter_backendsEnterpriseGroupMembershipViewSet.get_flex_group_memberships()EnterpriseGroupMembershipViewSet.nameEnterpriseGroupMembershipViewSet.permission_classesEnterpriseGroupMembershipViewSet.querysetEnterpriseGroupMembershipViewSet.serializer_classEnterpriseGroupMembershipViewSet.suffix
- enterprise.api.v1.views.enterprise_sso_users module
- enterprise.api.v1.views.enterprise_subsidy_fulfillment module
EnrollmentModificationExceptionEnterpriseSubsidyFulfillmentViewSetEnterpriseSubsidyFulfillmentViewSet.basenameEnterpriseSubsidyFulfillmentViewSet.cancel_enrollment()EnterpriseSubsidyFulfillmentViewSet.descriptionEnterpriseSubsidyFulfillmentViewSet.detailEnterpriseSubsidyFulfillmentViewSet.get_permission_object()EnterpriseSubsidyFulfillmentViewSet.get_permission_required()EnterpriseSubsidyFulfillmentViewSet.get_subsidy_fulfillment_serializer_class()EnterpriseSubsidyFulfillmentViewSet.get_unenrolled_fulfillment_serializer_class()EnterpriseSubsidyFulfillmentViewSet.nameEnterpriseSubsidyFulfillmentViewSet.requested_fulfillment_sourceEnterpriseSubsidyFulfillmentViewSet.retrieve()EnterpriseSubsidyFulfillmentViewSet.suffixEnterpriseSubsidyFulfillmentViewSet.unenrolled()
LicensedEnterpriseCourseEnrollmentViewSetLicensedEnterpriseCourseEnrollmentViewSet.EnrollmentTerminationStatusLicensedEnterpriseCourseEnrollmentViewSet.OPT_IGNORE_ENROLLMENTS_MODIFIED_AFTER_PARAMLicensedEnterpriseCourseEnrollmentViewSet.REQ_EXP_LICENSE_UUIDS_PARAMLicensedEnterpriseCourseEnrollmentViewSet.basenameLicensedEnterpriseCourseEnrollmentViewSet.bulk_licensed_enrollments_expiration()LicensedEnterpriseCourseEnrollmentViewSet.descriptionLicensedEnterpriseCourseEnrollmentViewSet.detailLicensedEnterpriseCourseEnrollmentViewSet.license_revoke()LicensedEnterpriseCourseEnrollmentViewSet.nameLicensedEnterpriseCourseEnrollmentViewSet.querysetLicensedEnterpriseCourseEnrollmentViewSet.serializer_classLicensedEnterpriseCourseEnrollmentViewSet.suffix
- enterprise.api.v1.views.notifications module
NotificationReadViewNotificationReadView.MISSING_REQUIRED_PARAMS_MSGNotificationReadView.REQUIRED_PARAM_ENTERPRISE_SLUGNotificationReadView.REQUIRED_PARAM_NOTIFICATION_IDNotificationReadView.authentication_classesNotificationReadView.get_missing_params_message()NotificationReadView.get_required_query_params()NotificationReadView.permission_classesNotificationReadView.post()NotificationReadView.throttle_classes
- enterprise.api.v1.views.pending_enterprise_customer_admin_user module
PendingEnterpriseCustomerAdminUserViewSetPendingEnterpriseCustomerAdminUserViewSet.FIELDSPendingEnterpriseCustomerAdminUserViewSet.basenamePendingEnterpriseCustomerAdminUserViewSet.descriptionPendingEnterpriseCustomerAdminUserViewSet.detailPendingEnterpriseCustomerAdminUserViewSet.filter_backendsPendingEnterpriseCustomerAdminUserViewSet.filterset_fieldsPendingEnterpriseCustomerAdminUserViewSet.namePendingEnterpriseCustomerAdminUserViewSet.ordering_fieldsPendingEnterpriseCustomerAdminUserViewSet.permission_classesPendingEnterpriseCustomerAdminUserViewSet.permission_requiredPendingEnterpriseCustomerAdminUserViewSet.querysetPendingEnterpriseCustomerAdminUserViewSet.serializer_classPendingEnterpriseCustomerAdminUserViewSet.suffix
- enterprise.api.v1.views.pending_enterprise_customer_user module
PendingEnterpriseCustomerUserEnterpriseAdminViewSetPendingEnterpriseCustomerUserEnterpriseAdminViewSet.basenamePendingEnterpriseCustomerUserEnterpriseAdminViewSet.descriptionPendingEnterpriseCustomerUserEnterpriseAdminViewSet.detailPendingEnterpriseCustomerUserEnterpriseAdminViewSet.link_learners()PendingEnterpriseCustomerUserEnterpriseAdminViewSet.namePendingEnterpriseCustomerUserEnterpriseAdminViewSet.permission_classesPendingEnterpriseCustomerUserEnterpriseAdminViewSet.serializer_classPendingEnterpriseCustomerUserEnterpriseAdminViewSet.suffix
PendingEnterpriseCustomerUserViewSetPendingEnterpriseCustomerUserViewSet.FIELDSPendingEnterpriseCustomerUserViewSet.UNIQUEPendingEnterpriseCustomerUserViewSet.USER_EXISTS_ERRORPendingEnterpriseCustomerUserViewSet.basenamePendingEnterpriseCustomerUserViewSet.create()PendingEnterpriseCustomerUserViewSet.descriptionPendingEnterpriseCustomerUserViewSet.detailPendingEnterpriseCustomerUserViewSet.filter_backendsPendingEnterpriseCustomerUserViewSet.filterset_fieldsPendingEnterpriseCustomerUserViewSet.namePendingEnterpriseCustomerUserViewSet.ordering_fieldsPendingEnterpriseCustomerUserViewSet.permission_classesPendingEnterpriseCustomerUserViewSet.querysetPendingEnterpriseCustomerUserViewSet.serializer_classPendingEnterpriseCustomerUserViewSet.suffix
- enterprise.api.v1.views.saml_provider_config module
SAMLProviderConfigViewSetSAMLProviderConfigViewSet.basenameSAMLProviderConfigViewSet.create()SAMLProviderConfigViewSet.descriptionSAMLProviderConfigViewSet.destroy()SAMLProviderConfigViewSet.detailSAMLProviderConfigViewSet.get_permission_object()SAMLProviderConfigViewSet.get_queryset()SAMLProviderConfigViewSet.get_serializer_class()SAMLProviderConfigViewSet.nameSAMLProviderConfigViewSet.permission_classesSAMLProviderConfigViewSet.permission_requiredSAMLProviderConfigViewSet.requested_enterprise_uuidSAMLProviderConfigViewSet.suffix
- enterprise.api.v1.views.saml_provider_data module
SAMLProviderDataViewSetSAMLProviderDataViewSet.basenameSAMLProviderDataViewSet.descriptionSAMLProviderDataViewSet.detailSAMLProviderDataViewSet.get_permission_object()SAMLProviderDataViewSet.get_queryset()SAMLProviderDataViewSet.get_serializer_class()SAMLProviderDataViewSet.nameSAMLProviderDataViewSet.permission_classesSAMLProviderDataViewSet.permission_requiredSAMLProviderDataViewSet.requested_enterprise_uuidSAMLProviderDataViewSet.suffixSAMLProviderDataViewSet.sync_provider_data()
- enterprise.api.v1.views.saml_utils module
- Module contents
Submodules#
enterprise.api.v1.decorators module#
Decorators for Enterprise API views.
- enterprise.api.v1.decorators.has_any_permissions(*permissions, **decorator_kwargs)#
Decorator that allows access if the user has at least one of the specified permissions, and optionally checks object-level permissions if a fn is provided to get the object.
- Parameters:
permissions – Permissions added via django_rules add_perm
decorator_kwargs – Arguments for permission checks
- Returns:
decorator
- enterprise.api.v1.decorators.require_at_least_one_query_parameter(*query_parameter_names)#
Ensure at least one of the specified query parameters are included in the request.
This decorator checks for the existence of at least one of the specified query parameters and passes the values as function parameters to the decorated view. If none of the specified query parameters are included in the request, a ValidationError is raised.
Usage:
@require_at_least_one_query_parameter('program_uuids', 'course_run_ids') def my_view(request, program_uuids, course_run_ids): # Some functionality ...
enterprise.api.v1.fields module#
Fields for Enterprise API serializers.
- class enterprise.api.v1.fields.Base64EmailCSVField(*args, **kwargs)#
Bases:
FieldSerializers a Base64 encoded CSV with emails into an array of emails
- to_internal_value(data)#
Transform the incoming primitive data into a native value.
- to_representation(value)#
Transform the outgoing native value into primitive data.
enterprise.api.v1.permissions module#
Custom API permissions.
- class enterprise.api.v1.permissions.IsInEnterpriseGroup#
Bases:
BasePermissionFind out if the requesting user belongs to a django group meant for granting access to an enterprise feature. This check applies to both staff and non-staff users.
- ALLOWED_API_GROUPS = []#
- has_permission(request, view)#
Return True if permission is granted, False otherwise.
- message = 'User is not allowed to access the view.'#
enterprise.api.v1.serializers module#
Serializers for enterprise api version 1.
- class enterprise.api.v1.serializers.AdminInviteSerializer(*args, **kwargs)#
Bases:
SerializerAccepts a list of email addresses for processing.
Example:
{ "emails": ["a@x.com", "b@x.com"] }
Validation:
Emails are validated for proper format.
Emails are stripped and lowercased.
Empty lists are not allowed.
Duplicate emails are not allowed.
(Optional) Additional business rules such as domain restrictions can be applied.
- validate_emails(value)#
Normalize emails and check for duplicates.
- Parameters:
value – List of email strings
- Returns:
List of normalized (stripped, lowercased) emails
- Raises:
ValidationError – If duplicate emails exist
- class enterprise.api.v1.serializers.AdminNotificationSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for AdminNotification model.
- class Meta#
Bases:
object- fields = ('id', 'title', 'text')#
- model#
alias of
AdminNotification
- class enterprise.api.v1.serializers.AnalyticsSummarySerializer(*args, **kwargs)#
Bases:
SerializerSerializer for the payload data of analytics summary endpoint.
- class LearnerEngagementSerializer(*args, **kwargs)#
Bases:
SerializerSerializer for the summary related data in the analytics summary endpoint.
- class LearnerProgressSerializer(*args, **kwargs)#
Bases:
SerializerSerializer for the learner progress data in the analytics summary endpoint.
- class enterprise.api.v1.serializers.BaseEnterpriseCustomerInviteKeySerializer(*args, **kwargs)#
Bases:
ModelSerializerBase serializer for writing to the EnterpriseCustomerInviteKey model.
- class Meta#
Bases:
object- fields = ('uuid', 'enterprise_customer_uuid', 'usage_limit', 'expiration_date', 'is_active', 'is_valid')#
- model#
alias of
EnterpriseCustomerInviteKey
- class enterprise.api.v1.serializers.CourseDetailSerializer(*args, **kwargs)#
Bases:
ImmutableStateSerializerSerializer for course data retrieved from the discovery service course detail API endpoint.
This serializer updates the course and course run data with the EnterpriseCustomer-specific enrollment page URL for the given course and course runs.
- class enterprise.api.v1.serializers.CourseRunDetailSerializer(*args, **kwargs)#
Bases:
ImmutableStateSerializerSerializer for course run data retrieved from the discovery service course_run detail API endpoint.
This serializer updates the course run data with the EnterpriseCustomer-specific enrollment page URL for the given course run.
- class enterprise.api.v1.serializers.DefaultEnterpriseEnrollmentIntentionLearnerStatusSerializer(*args, **kwargs)#
Bases:
SerializerSerializer for the DefaultEnterpriseEnrollmentIntentionLearnerStatus model.
- already_enrolled_count()#
Return the count of already enrolled.
- get_enrollment_statuses(obj)#
Return default enterprise enrollment intentions partitioned by the enrollment statuses for the learner.
- get_metadata(obj)#
Return the metadata for the default enterprise enrollment intention, including number of default enterprise enrollment intentions that need enrollment, are already enrolled by the learner.
- needs_enrollment_counts()#
Return the counts of needs_enrollment.
- serialize_intentions(default_enrollment_intentions)#
Helper function to handle tuple unpacking and serialization.
- total_default_enrollment_intention_count()#
Return the total count of default enrollment intentions.
- class enterprise.api.v1.serializers.DefaultEnterpriseEnrollmentIntentionSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for the DefaultEnterpriseEnrollmentIntention model.
- class Meta#
Bases:
object- fields = ('uuid', 'content_key', 'enterprise_customer', 'course_key', 'course_run_key', 'is_course_run_enrollable', 'best_mode_for_course_run', 'applicable_enterprise_catalog_uuids', 'course_run_normalized_metadata', 'created', 'modified')#
- model#
alias of
DefaultEnterpriseEnrollmentIntention
- get_applicable_enterprise_catalog_uuids(obj)#
- get_best_mode_for_course_run(obj)#
Get the best course mode for the course run.
- get_course_run_key(obj)#
Get the course run key for the enrollment intention
- get_course_run_normalized_metadata(obj)#
Get the course run for the enrollment intention
- get_is_course_run_enrollable(obj)#
Get the course run enrollable status for the enrollment intention
- class enterprise.api.v1.serializers.DefaultEnterpriseEnrollmentIntentionWithEnrollmentStateSerializer(*args, **kwargs)#
Bases:
DefaultEnterpriseEnrollmentIntentionSerializerSerializer for the DefaultEnterpriseEnrollmentIntention model with enrollment state.
- class Meta#
Bases:
Meta- fields = ('uuid', 'content_key', 'enterprise_customer', 'course_key', 'course_run_key', 'is_course_run_enrollable', 'best_mode_for_course_run', 'applicable_enterprise_catalog_uuids', 'course_run_normalized_metadata', 'created', 'modified', 'has_existing_enrollment', 'is_existing_enrollment_active', 'is_existing_enrollment_audit')#
- get_has_existing_enrollment(obj)#
- get_is_existing_enrollment_active(obj)#
- get_is_existing_enrollment_audit(obj)#
- class enterprise.api.v1.serializers.EnrollmentsInfoSerializer(*args, **kwargs)#
Bases:
SerializerNested serializer class to allow for many license info dictionaries.
- create(validated_data)#
- validate(data)#
- class enterprise.api.v1.serializers.EnterpriseAdminMemberSerializer(*args, **kwargs)#
Bases:
SerializerResponse serializer for enterprise admin members.
- class enterprise.api.v1.serializers.EnterpriseCatalogQuerySerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for the
EnterpriseCatalogQuerymodel.- class Meta#
Bases:
object- fields = '__all__'#
- model#
alias of
EnterpriseCatalogQuery
- class enterprise.api.v1.serializers.EnterpriseCourseEnrollmentAdminViewSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseCourseEnrollment model.
- class Meta#
Bases:
object- fields = '__all__'#
- model#
alias of
EnterpriseCourseEnrollment
- to_representation(instance)#
Convert the EnterpriseCourseEnrollment instance into a dictionary representation.
- Parameters:
instance (EnterpriseCourseEnrollment) – The enrollment instance being serialized.
- Returns:
A dictionary representation of the enrollment data.
- Return type:
- class enterprise.api.v1.serializers.EnterpriseCourseEnrollmentReadOnlySerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseCourseEnrollment model.
- class Meta#
Bases:
object- fields = ('enterprise_customer_user', 'course_id', 'unenrolled_at', 'created')#
- model#
alias of
EnterpriseCourseEnrollment
- class enterprise.api.v1.serializers.EnterpriseCourseEnrollmentWithAdditionalFieldsReadOnlySerializer(*args, **kwargs)#
Bases:
EnterpriseCourseEnrollmentReadOnlySerializerSerializer for EnterpriseCourseEnrollment model with additional fields.
- class Meta#
Bases:
object- fields = ('enterprise_customer_user', 'course_id', 'created', 'unenrolled_at', 'enrollment_date', 'enrollment_track', 'user_email', 'course_start', 'course_end')#
- model#
alias of
EnterpriseCourseEnrollment
- class enterprise.api.v1.serializers.EnterpriseCourseEnrollmentWriteSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for writing to the EnterpriseCourseEnrollment model.
- class Meta#
Bases:
object- fields = ('username', 'course_id')#
- model#
alias of
EnterpriseCourseEnrollment
- enterprise_customer_user = None#
- save()#
Save the model with the found EnterpriseCustomerUser.
- validate_username(value)#
Verify that the username has a matching user, and that the user has an associated EnterpriseCustomerUser.
- class enterprise.api.v1.serializers.EnterpriseCustomerAdminSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseCustomerAdmin model.
- class Meta#
Bases:
object- fields = ['uuid', 'enterprise_customer_user', 'last_login', 'completed_tour_flows', 'onboarding_tour_dismissed', 'onboarding_tour_completed']#
- model#
alias of
EnterpriseCustomerAdmin
- read_only_fields = ['uuid']#
- to_representation(instance)#
Convert the instance to a dictionary representation.
- class enterprise.api.v1.serializers.EnterpriseCustomerApiCredentialRegeneratePatchSerializer(*args, **kwargs)#
Bases:
SerializerSerializer for the
EnterpriseCustomerApiCredential
- class enterprise.api.v1.serializers.EnterpriseCustomerApiCredentialSerializer(*args, **kwargs)#
Bases:
SerializerSerializer for the
EnterpriseCustomerApiCredential- update(instance, validated_data)#
- class enterprise.api.v1.serializers.EnterpriseCustomerBasicSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseCustomer model only for name and id fields.
- class Meta#
Bases:
object- fields = ('id', 'name')#
- model#
alias of
EnterpriseCustomer
- class enterprise.api.v1.serializers.EnterpriseCustomerBrandingConfigurationSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseCustomerBrandingConfiguration model.
- class Meta#
Bases:
object- fields = ('enterprise_customer', 'enterprise_slug', 'logo', 'primary_color', 'secondary_color', 'tertiary_color')#
- model#
- get_enterprise_customer(obj)#
Return a string representation of the associated enterprise customer’s UUID.
- get_enterprise_slug(obj)#
Return the slug of the associated enterprise customer.
- get_logo(obj)#
Use EnterpriseCustomerBrandingConfiguration.safe_logo_url to return an absolute URL for either the saved customer logo or the platform logo by default
- get_primary_color(obj)#
Return the primary color of the branding config OR the default primary color code
- get_secondary_color(obj)#
Return the secondary color of the branding config OR the default secondary color code
- get_tertiary_color(obj)#
Return the tertiary color of the branding config OR the default tertiary color code
- class enterprise.api.v1.serializers.EnterpriseCustomerBulkEnrollmentsSerializer(*args, **kwargs)#
Bases:
SerializerSerializes a email_csv or email field for bulk enrollment requests.
- create(validated_data)#
- validate(data)#
- class enterprise.api.v1.serializers.EnterpriseCustomerBulkSubscriptionEnrollmentsSerializer(*args, **kwargs)#
Bases:
SerializerSerializes a licenses info field for bulk enrollment requests.
- create(validated_data)#
- validate(data)#
- class enterprise.api.v1.serializers.EnterpriseCustomerCatalogDetailSerializer(*args, **kwargs)#
Bases:
EnterpriseCustomerCatalogSerializerSerializer for the
EnterpriseCustomerCatalogmodel which includes the catalog’s discovery service search query results.- to_representation(instance)#
Serialize the EnterpriseCustomerCatalog object.
- Parameters:
instance (EnterpriseCustomerCatalog) – The EnterpriseCustomerCatalog to serialize.
- Returns:
The EnterpriseCustomerCatalog converted to a dict.
- Return type:
- class enterprise.api.v1.serializers.EnterpriseCustomerCatalogSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for the
EnterpriseCustomerCatalogmodel.- class Meta#
Bases:
object- fields = ('uuid', 'title', 'enterprise_customer', 'enterprise_catalog_query', 'created', 'modified')#
- model#
alias of
EnterpriseCustomerCatalog
- class enterprise.api.v1.serializers.EnterpriseCustomerCatalogWriteOnlySerializer(*args, **kwargs)#
Bases:
EnterpriseCustomerCatalogSerializerSerializer for the
EnterpriseCustomerCatalogmodel which includes the catalog’s discovery service search query results.- class Meta#
Bases:
object- extra_kwargs = {'enterprise_catalog_query': {'required': False}, 'enterprise_customer': {'required': True}, 'title': {'required': True}, 'uuid': {'required': False}}#
- fields = ('uuid', 'title', 'enterprise_customer', 'enterprise_catalog_query')#
- model#
alias of
EnterpriseCustomerCatalog
- class enterprise.api.v1.serializers.EnterpriseCustomerCourseEnrollmentsListSerializer(*args, **kwargs)#
Bases:
ListSerializerSerializes a list of enrollment requests.
Meant to be used in conjunction with EnterpriseCustomerCourseEnrollmentsSerializer.
- create(validated_data)#
This selectively calls the child create method based on whether or not validation failed for each payload.
- to_internal_value(data)#
This implements the same relevant logic as ListSerializer except that if one or more items fail validation, processing for other items that did not fail will continue.
- to_representation(data)#
This selectively calls to_representation on each result that was processed by create.
- class enterprise.api.v1.serializers.EnterpriseCustomerCourseEnrollmentsSerializer(*args, **kwargs)#
Bases:
SerializerSerializes enrollment information for a collection of students/emails.
This is mainly useful for implementing validation when performing enrollment operations.
- create(validated_data)#
Perform the enrollment for existing enterprise customer users, or create the pending objects for new users.
- validate(data)#
Validate that at least one of the user identifier fields has been passed in.
- validate_course_run_id(value)#
Validates that the course run id is part of the Enterprise Customer’s catalog.
- validate_lms_user_id(value)#
Validates the lms_user_id, if is given, to see if there is an existing EnterpriseCustomerUser for it.
- validate_tpa_user_id(value)#
Validates the tpa_user_id, if is given, to see if there is an existing EnterpriseCustomerUser for it.
It first uses the third party auth api to find the associated username to do the lookup.
- validate_user_email(value)#
Validates the user_email, if given, to see if an existing EnterpriseCustomerUser exists for it.
If it does not, it does not fail validation, unlike for the other field validation methods above.
- class enterprise.api.v1.serializers.EnterpriseCustomerIdentityProviderSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseCustomerIdentityProvider model.
- class Meta#
Bases:
object- fields = ('provider_id', 'default_provider')#
- model#
alias of
EnterpriseCustomerIdentityProvider
- class enterprise.api.v1.serializers.EnterpriseCustomerInviteKeyPartialUpdateSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for updating the EnterpriseCustomerInviteKey model.
- class Meta#
Bases:
object- fields = ('expiration_date', 'is_active')#
- model#
alias of
EnterpriseCustomerInviteKey
- class enterprise.api.v1.serializers.EnterpriseCustomerInviteKeyReadOnlySerializer(*args, **kwargs)#
Bases:
BaseEnterpriseCustomerInviteKeySerializerSerializer for reading the EnterpriseCustomerInviteKey model.
- class Meta#
Bases:
Meta- additional_fields = ('enterprise_customer_name', 'usage_count', 'created')#
- fields = ('uuid', 'enterprise_customer_uuid', 'usage_limit', 'expiration_date', 'is_active', 'is_valid', 'enterprise_customer_name', 'usage_count', 'created')#
- get_enterprise_customer_name(obj)#
- get_enterprise_customer_uuid(obj)#
- class enterprise.api.v1.serializers.EnterpriseCustomerInviteKeyWriteSerializer(*args, **kwargs)#
Bases:
BaseEnterpriseCustomerInviteKeySerializerSerializer for writing to the EnterpriseCustomerInviteKey model.
- save()#
- validate_enterprise_customer_uuid(value)#
Validates an EnterpriseCustomer with the given enterprise_customer_uuid exists.
- class enterprise.api.v1.serializers.EnterpriseCustomerMembersRequestQuerySerializer(*args, **kwargs)#
Bases:
SerializerSerializer for the Enterprise Customer Members endpoint query filter
- class enterprise.api.v1.serializers.EnterpriseCustomerReportingConfigurationSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseCustomerReportingConfiguration model.
- class Meta#
Bases:
object- fields = ('enterprise_customer', 'enterprise_customer_id', 'active', 'delivery_method', 'email', 'frequency', 'day_of_month', 'day_of_week', 'hour_of_day', 'include_date', 'encrypted_password', 'sftp_hostname', 'sftp_port', 'sftp_username', 'encrypted_sftp_password', 'sftp_file_path', 'data_type', 'report_type', 'pgp_encryption_key', 'enterprise_customer_catalogs', 'uuid', 'enterprise_customer_catalog_uuids', 'enable_compression')#
- model#
- create(validated_data)#
Perform the creation of model instance and link the enterprise customer catalogs.
- Parameters:
validated_data (dict) – A dictionary containing serializer’s validated data.
- Returns:
- Instance of the newly created enterprise customer
reporting configuration.
- Return type:
- update(instance, validated_data)#
Update the instance of enterprise customer reporting configuration and link the enterprise customer catalogs.
- Parameters:
instance (EnterpriseCustomerReportingConfiguration) – Instance of the enterprise customer reporting configuration being updated.
validated_data (dict) – A dictionary containing serializer’s validated data.
- Returns:
- Instance of the newly created enterprise customer
reporting configuration.
- Return type:
- validate(data)#
- validate_pgp_encryption_key(value)#
Validate that pgp_encryption_key is correctly set or left empty.
- class enterprise.api.v1.serializers.EnterpriseCustomerSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseCustomer model.
- class Meta#
Bases:
object- fields = ('uuid', 'name', 'slug', 'active', 'auth_org_id', 'site', 'enable_data_sharing_consent', 'enforce_data_sharing_consent', 'branding_configuration', 'disable_expiry_messaging_for_learner_credit', 'identity_provider', 'enable_audit_enrollment', 'replace_sensitive_sso_username', 'enable_portal_code_management_screen', 'sync_learner_profile_data', 'enable_audit_data_reporting', 'enable_learner_portal', 'enable_learner_portal_offers', 'enable_portal_learner_credit_management_screen', 'enable_executive_education_2U_fulfillment', 'enable_portal_reporting_config_screen', 'enable_portal_saml_configuration_screen', 'contact_email', 'enable_portal_subscription_management_screen', 'hide_course_original_price', 'enable_analytics_screen', 'enable_integrated_customer_learner_portal_search', 'enable_generation_of_api_credentials', 'enable_portal_lms_configurations_screen', 'sender_alias', 'identity_providers', 'enterprise_customer_catalogs', 'reply_to', 'enterprise_notification_banner', 'hide_labor_market_data', 'modified', 'enable_universal_link', 'enable_browse_and_request', 'admin_users', 'enable_learner_portal_sidebar_message', 'learner_portal_sidebar_content', 'enable_pathways', 'enable_programs', 'enable_demo_data_for_analytics_and_lpr', 'enable_academies', 'enable_one_academy', 'active_integrations', 'show_videos_in_learner_portal_search_results', 'default_language', 'country', 'enable_slug_login', 'enable_learner_credit_message_box')#
- model#
alias of
EnterpriseCustomer
- get_active_integrations(obj)#
- get_admin_users(obj)#
- get_branding_configuration(obj)#
Return the serialized branding configuration object OR default object if null
- get_enterprise_customer_catalogs(obj)#
Return list of catalog uuids associated with the enterprise customer.
- get_enterprise_notification_banner(obj)#
Return the notification text if exist OR None
- class enterprise.api.v1.serializers.EnterpriseCustomerSsoConfiguration(*args, **kwargs)#
Bases:
ModelSerializerSerializer for the
EnterpriseCustomerSsoConfigurationmodel.- class Meta#
Bases:
object- fields = '__all__'#
- model#
alias of
EnterpriseCustomerSsoConfiguration
- get_enterprise_customer(obj)#
Return a string representation of the associated enterprise customer’s UUID.
- get_is_pending_configuration(obj)#
Return whether the SSO configuration is pending configuration.
- class enterprise.api.v1.serializers.EnterpriseCustomerSupportToolSerializer(*args, **kwargs)#
Bases:
EnterpriseCustomerSerializerExtends the EnterpriseCustomerSerializer with additional fields to needed in the MFE Support tool.
- class Meta#
Bases:
object- fields = ('uuid', 'name', 'slug', 'active', 'auth_org_id', 'site', 'enable_data_sharing_consent', 'enforce_data_sharing_consent', 'branding_configuration', 'disable_expiry_messaging_for_learner_credit', 'identity_provider', 'enable_audit_enrollment', 'replace_sensitive_sso_username', 'enable_portal_code_management_screen', 'sync_learner_profile_data', 'enable_audit_data_reporting', 'enable_learner_portal', 'enable_learner_portal_offers', 'enable_portal_learner_credit_management_screen', 'enable_executive_education_2U_fulfillment', 'enable_portal_reporting_config_screen', 'enable_portal_saml_configuration_screen', 'contact_email', 'enable_portal_subscription_management_screen', 'hide_course_original_price', 'enable_analytics_screen', 'enable_integrated_customer_learner_portal_search', 'enable_generation_of_api_credentials', 'enable_portal_lms_configurations_screen', 'sender_alias', 'identity_providers', 'enterprise_customer_catalogs', 'reply_to', 'enterprise_notification_banner', 'hide_labor_market_data', 'modified', 'enable_universal_link', 'enable_browse_and_request', 'admin_users', 'enable_learner_portal_sidebar_message', 'learner_portal_sidebar_content', 'enable_pathways', 'enable_programs', 'enable_demo_data_for_analytics_and_lpr', 'enable_academies', 'enable_one_academy', 'active_integrations', 'show_videos_in_learner_portal_search_results', 'default_language', 'country', 'enable_slug_login', 'active_sso_configurations', 'created', 'enable_learner_credit_message_box')#
- model#
alias of
EnterpriseCustomer
- get_active_sso_configurations(obj)#
- class enterprise.api.v1.serializers.EnterpriseCustomerToggleUniversalLinkSerializer(*args, **kwargs)#
Bases:
SerializerSerializer for toggling an EnterpriseCustomer enable_universal_link field.
- class enterprise.api.v1.serializers.EnterpriseCustomerUnlinkUsersSerializer(*args, **kwargs)#
Bases:
SerializerSerializer for the
EnterpriseCustomerViewSetunlink_users action.
- class enterprise.api.v1.serializers.EnterpriseCustomerUserReadOnlySerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseCustomerUser model.
- class Meta#
Bases:
object- fields = ('id', 'enterprise_customer', 'active', 'user_id', 'user', 'data_sharing_consent_records', 'groups', 'created', 'invite_key', 'role_assignments', 'enterprise_group')#
- model#
alias of
EnterpriseCustomerUser
- get_data_sharing_consent_records(obj)#
Return serialization of EnterpriseCustomerUser.data_sharing_consent_records property.
- get_enterprise_customer(obj)#
Return serialization of EnterpriseCustomer associated with the EnterpriseCustomerUser.
- get_enterprise_group(obj)#
Return the enterprise group membership for this enterprise customer user.
- get_groups(obj)#
Return the enterprise related django groups that this user is a part of.
- get_role_assignments(obj)#
Return the enterprise role assignments for this enterprise customer user.
- class enterprise.api.v1.serializers.EnterpriseCustomerUserWriteSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for writing to the EnterpriseCustomerUser model.
- class Meta#
Bases:
object- fields = ('enterprise_customer', 'username', 'active')#
- model#
alias of
EnterpriseCustomerUser
- USER_DOES_NOT_EXIST = 'User does not exist'#
- save()#
Save the EnterpriseCustomerUser.
- user = None#
- validate_username(value)#
Verify that the username has a matching user.
- class enterprise.api.v1.serializers.EnterpriseGroupLearnersRequestQuerySerializer(*args, **kwargs)#
Bases:
SerializerSerializer for the Enterprise Group Learners endpoint query filter
- class enterprise.api.v1.serializers.EnterpriseGroupMembershipSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseGroupMembership model.
- class Meta#
Bases:
object- fields = ('enterprise_customer_user_id', 'lms_user_id', 'pending_enterprise_customer_user_id', 'enterprise_group_membership_uuid', 'member_details', 'recent_action', 'status', 'activated_at', 'enrollments', 'group_name', 'group_uuid')#
- model#
alias of
EnterpriseGroupMembership
- get_enrollments(obj)#
Fetch all of user’s enterprise enrollments
- get_member_details(obj)#
Return either the member’s name and email if it’s the case that the member is realized, otherwise just email
- get_recent_action(obj)#
Return the timestamp and name of the most recent action associated with the membership.
- class enterprise.api.v1.serializers.EnterpriseGroupRequestDataSerializer(*args, **kwargs)#
Bases:
SerializerSerializer for the Enterprise Group Assign Learners endpoint query params
- class enterprise.api.v1.serializers.EnterpriseGroupSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseGroup model.
- class Meta#
Bases:
object- fields = ('enterprise_customer', 'name', 'uuid', 'accepted_members_count', 'group_type', 'created')#
- model#
alias of
EnterpriseGroup
- validators#
- get_accepted_members_count(obj)#
Returns count for accepted members
- class enterprise.api.v1.serializers.EnterpriseMembersSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for EnterpriseCustomerUser model with additions.
- class Meta#
Bases:
object- fields = ('enterprise_customer_user', 'enrollments')#
- model#
alias of
EnterpriseCustomerUser
- get_enrollments(obj)#
Fetch all of user’s enterprise enrollments
- get_enterprise_customer_user(obj)#
Return either the member’s name and email if it’s the case that the member is realized, otherwise just email
- class enterprise.api.v1.serializers.EnterpriseSSOUserInfoRequestSerializer(*args, **kwargs)#
Bases:
SerializerSerializer for Enterprise SSO user details request parameters.
- class enterprise.api.v1.serializers.EnterpriseUserSerializer(*args, **kwargs)#
Bases:
SerializerSerializer for EnterpriseCustomerUser model with additions.
- class Meta#
Bases:
object- fields = ('enterprise_customer_userpending_enterprise_customer_user', 'role_assignmentsis_admin')#
- model#
alias of
EnterpriseCustomerSupportUsersView
- get_enterprise_customer_user(obj)#
Return enterprise customer user info
- get_is_admin(obj)#
- get_pending_enterprise_customer_user(obj)#
Return either the pending user info
- get_role_assignments(obj)#
Fetch user’s role assignments
- is_enterprise_customer_user(obj)#
- class enterprise.api.v1.serializers.ImmutableStateSerializer(*args, **kwargs)#
Bases:
SerializerBase serializer for any serializer that inhibits state changing requests.
- create(validated_data)#
Do not perform any operations for state changing requests.
- update(instance, validated_data)#
Do not perform any operations for state changing requests.
- class enterprise.api.v1.serializers.LearnerCreditEnterpriseCourseEnrollmentReadOnlySerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for LearnerCreditEnterpriseCourseEnrollment model.
- class enterprise.api.v1.serializers.LicensedEnterpriseCourseEnrollmentReadOnlySerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for LicensedEnterpriseCourseEnrollment model.
- class Meta#
Bases:
object- fields = ('enterprise_course_enrollment', 'license_uuid', 'uuid')#
- model#
alias of
LicensedEnterpriseCourseEnrollment
- class enterprise.api.v1.serializers.LinkLearnersSerializer(*args, **kwargs)#
Bases:
PendingEnterpriseCustomerUserSerializerExtends the PendingEnterpriseCustomerSerializer to validate that the enterprise customer uuid matches the uuid the user has permissions to update
- NOT_AUTHORIZED_ERROR = 'Not authorized for this enterprise'#
- validate_enterprise_customer(value)#
Check that the enterprise customer is the same as the one the user has permissions for The value recieved is an EnterpriseCustomer object
- class enterprise.api.v1.serializers.PendingEnterpriseCustomerAdminUserSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for the
PendingEnterpriseCustomerAdminUsermodel.- class Meta#
Bases:
object- fields = ('id', 'enterprise_customer', 'user_email')#
- model#
alias of
PendingEnterpriseCustomerAdminUser
- validators = []#
- save(**kwargs)#
Attempts to save the pending enterprise customer admin user data while handling potential integrity errors.
- validate(attrs)#
Validate the pending enterprise customer admin user data.
- class enterprise.api.v1.serializers.PendingEnterpriseCustomerUserSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for writing to the PendingEnterpriseCustomerUser model.
- class Meta#
Bases:
object- fields = ('enterprise_customer', 'user_email')#
- model#
alias of
PendingEnterpriseCustomerUser
- validators = []#
- create(attrs)#
Create the PendingEnterpriseCustomerUser, or EnterpriseCustomerUser if a user with the validated_email already exists.
- to_representation(instance)#
Because we are returning whether or not the instance was created from the create method, we must use the instance for to_representation and ignore the “created” half of the tuple
- class enterprise.api.v1.serializers.ProgramDetailSerializer(*args, **kwargs)#
Bases:
ImmutableStateSerializerSerializer for program data retrieved from the discovery service program detail API endpoint.
This serializer updates the program data and child course run data with EnterpriseCustomer-specific enrollment page URLs for the given content types.
- class enterprise.api.v1.serializers.ResponsePaginationSerializer(*args, **kwargs)#
Bases:
ImmutableStateSerializerSerializer for responses that require pagination.
- class enterprise.api.v1.serializers.SiteField(*args, **kwargs)#
Bases:
FieldCustom Site field to facilitate with creation of parent objects, while also keeping output pretty.
When used in a ModelSerializer, the site field can be provided to the create() REST API endpoint as follows, which performs a lookup for a site with the domain “example.com”:
"site": {"domain": "example.com"}
Output serializations render sites with all Site fields.
- to_internal_value(data)#
Transform the incoming primitive data into a native value.
- to_representation(value)#
Transform the outgoing native value into primitive data.
- class enterprise.api.v1.serializers.SiteSerializer(*args, **kwargs)#
Bases:
ModelSerializerSerializer for Site model.
enterprise.api.v1.urls module#
URL definitions for enterprise api version 1 endpoint.
Module contents#
API endpoint for enterprise app.