KSC Open API
Kaspersky Security Center API description
long UserDevicesApi::CreateEnrollmentPackage ( binary  pUserId,
int  lMdmProtocols,
int  lDeliveryType,
int  lLiveTime,
wstring  c_wstrUrlFormat 
)

Creates the enrollment package for an user's device.

The method will be completed before the package is finally created, to find out when the package is ready you should call method UserDevicesApi.GetEnrollmentPackage many times.

Parameters:
pUserId(binary) device owner binary identifier, empty means current user (currently logged on the server user)
lMdmProtocols(int) bit mask means which protocols the enrollment package will be created for, see: Mobile device protocol ID
lDeliveryType(int) bit mask means the enrollment package delivery type (DEPRECATED, just set 0)
lLiveTime(int) means how long the enrollment package is available for download (in hours)
c_wstrUrlFormat(wstring) format of the unified link to download the package by a mobile device, example "https://www.ssp_server.com/pkg?id=%s"
Returns:
(long) package id to be used to access the enrollment package state and its attributes.