KSC Open API
Kaspersky Security Center API description
MdmCertCtrlApi::GeneratePackageAsync2 ( params  pPackageInfo,
params  pCertificate,
params  pRecipients,
params  pNotification,
[out] wstring  wstrRequestId 
)

Publishes installation packages for the users.

Parameters:
pPackageInfo(params) contains protocol-specific package information, it may be passed in 2 forms, only one form must be presented.
AttributeTypeDescriptionAdditional information
Form for the package:
"GPProtocolId"(paramInt)Protocol idsee MDM Protocol Type
"GPHostId"(paramString)MDM server host idfor IOSMDM protocol only
"GPMtncSrvId"(paramString)MDM multitenancy server idfor IOSMDM protocol only
"GPPkgId"(paramString)NPackage idcurrently used for KES protocol only
Form for the configuration url:
"GCDevOsType"(paramInt)Device OS typesee Device Operating System Type
pCertificate(params) certificate parameters (optional)
AttributeTypeDescriptionAdditional information
Certificate: (optional, see Common format for certificate params), if omitted it will be generated:
"CPublic"(paramBinary)certificatePEM format
"CPrivate"(paramBinary)private key for "CPublic"encrypted by "CPassword"
"CPKCS12"(paramBinary)certificatePFX format, used if "CPublic" and "CPrivate" are not specified
"CPassword"(paramBinary)password for "CPrivate" or "CPKCS12"encrypted
Other parameters:
"CExpiryPeriod"(paramInt)certificate validity expiry period in days
"CBits"(paramInt)key length
"CPKITemplate"(paramString)PKI template nameencrypted
pRecipients(params) recipient parameters
AttributeTypeDescriptionAdditional information
"ul_binId"(paramBinary)universal user id. See ul_binIdmandatory
"ul_wstrMail"(paramString)EMail addressoptional
"ul_wstrMailExtra"(paramString)additional EMail addressoptional
"User_wstrMailAlt"(paramString)alternative emailoptional
pNotification(params) method of notifying the user (optional)
AttributeTypeDescriptionAdditional information
"NMwstrNotification"(paramString)Notification text for mailmay contain URL% and/or PASS% template
"NMwstrNotificationSubject"(paramString)Notification subject for mail
[out]wstrRequestId(wstring) identity of asynchronous operation:
  • to cancel operation call MdmCertCtrlApi::CancelGeneratePackage;
  • to get status body use AsyncActionStateChecker::CheckActionState, lStateCode "1" means OK and "0" means fail;
  • to get result use AsyncActionStateChecker::CheckActionState, pStateData contains:
    AttributeTypeDescriptionAdditional information
    "AKLWNGTMDM_GenPkgAsyncResult_Url"(paramString) MDM Package Typeif success, for 'File Url' and 'Config Url' package types (see MDM Package Type)
    "AKLWNGTMDM_GenPkgAsyncResult_Pwd"(paramString) Passwordif success, for 'File Url' package type only
    "AKLWNGTMDM_GenPkgAsyncResult_ErrorDesc"(paramString) description of package generation errorif it occurred