@@ -708,6 +708,72 @@ def revokeOrgIssuedClientCertificates(
708708 return resp
709709
710710
711+ def searchOrgScepEvents (
712+ mist_session : _APISession ,
713+ org_id : str ,
714+ type : str | None = None ,
715+ cert_provider : str | None = None ,
716+ common_name : str | None = None ,
717+ device_id : str | None = None ,
718+ text : str | None = None ,
719+ limit : int | None = None ,
720+ page : int | None = None ,
721+ ) -> _APIResponse :
722+ """
723+ API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/scep/search-org-scep-events
724+
725+ PARAMS
726+ -----------
727+ mistapi.APISession : mist_session
728+ mistapi session including authentication and Mist host information
729+
730+ PATH PARAMS
731+ -----------
732+ org_id : str
733+
734+ QUERY PARAMS
735+ ------------
736+ type : str{'failure', 'success'}
737+ Filter by event type. enum: `failure`, `success`
738+ cert_provider : str
739+ Filter by the MDM or certificate provider that triggered the operation
740+ common_name : str
741+ Partial match against the certificate common name, such as a user UPN
742+ device_id : str
743+ Filter by the device identifier associated with the SCEP operation
744+ text : str
745+ Keyword search within the event reason text
746+ limit : int, default: 100
747+ Maximum number of results to return per page
748+ page : int, default: 1
749+ Select the page number to return when using page-based pagination; starts at `1`
750+
751+ RETURN
752+ -----------
753+ mistapi.APIResponse
754+ response from the API call
755+ """
756+
757+ uri = f"/api/v1/orgs/{ org_id } /setting/mist_scep/events/search"
758+ query_params : dict [str , str ] = {}
759+ if type :
760+ query_params ["type" ] = str (type )
761+ if cert_provider :
762+ query_params ["cert_provider" ] = str (cert_provider )
763+ if common_name :
764+ query_params ["common_name" ] = str (common_name )
765+ if device_id :
766+ query_params ["device_id" ] = str (device_id )
767+ if text :
768+ query_params ["text" ] = str (text )
769+ if limit :
770+ query_params ["limit" ] = str (limit )
771+ if page :
772+ query_params ["page" ] = str (page )
773+ resp = mist_session .mist_get (uri = uri , query = query_params )
774+ return resp
775+
776+
711777def setOrgCustomBucket (
712778 mist_session : _APISession , org_id : str , body : dict | list
713779) -> _APIResponse :
0 commit comments