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 if required, it may be passed in 2 forms.
AttributeTypeDescriptionAdditional information
1st form for packages:
"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
2nd form for configuration urls:
"GCDevOsType"(paramInt)Device OS typesee Device Operating System Type
pCertificate(params) certificate parameters
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(array) array of notification recipients (paramParams)
AttributeTypeDescriptionAdditional information
"ul_binId"(paramBinary)universal user idmandatory
At least one of the fields below should be set:
"ul_wstrMail"(paramString)EMail addressoptional
"ul_wstrMailExtra"(paramString)additional EMail addressoptional
"User_wstrMailAlt"(paramString)alternative emailoptional
"ul_wstrTelephoneNumber"(paramString)phone numberoptional
"ul_wstrTelephoneExtra"(paramString)additional phone numberoptional
"ul_wstrMobile"(paramString)mobile phone numberoptional
"User_wstrMobileAlt"(paramString)alternative mobileoptional
pNotification(params) method of notifying the user
AttributeTypeDescriptionAdditional information
Only one of the following must be present (value does not matter):
"NMwstrNotification"(paramString)Notification text for mailmay contain URL% and/or PASS% template
"NMwstrNotificationSubject"(paramString)Notification subject for mail
"NMwstrNotificationSimple"(paramString)Notification message for SMSmust contain URL% and/or PASS% template
[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

Device Operating System Type

Certificate typeDescription
1IOS
2Android

MDM Protocol Type

Certificate typeDescription
1IOSMDM
2KES (Mobile)
4EAS (Exchange ActiveSync)

MDM Package Type

Certificate typeDescription
1File Url
2Config Url