Altiris.PatchManagementCore.Web

PatchManagementCore.Web.PatchWorkflowSvc

Patch Management Workflow Service API is available at URL <NS>/Altiris/PatchManagementCore/PatchWorkflowSvc.asmx

The API is exposed as Web Service (SOAP) and has the meta-information, that documents each API method if you open the service URL in browser and allows to test it directly from browser if service URL is opened there.

Most of API methods use only primitive data types so there are no restrictions where to call them from. If API receives GUID or list of GUID's – they are provided as strings. In case of GUID list – GUID entries are "comma separated".

If during the API call, some NS item is loaded – the item access security applies automatically, depending of the caller identity.

NameDescription
1. AddGuids

This is generic API to append GUID or list of GUID's to some property of NS item.

2. CreateAgentPluginPolicy

Creates Patch Agent Plugin policy.

3. CreateSolarisUpdateInstallationTask

Creates "Solaris Update Installation" task.

4. CreateUpdatePolicy

Creates a Software Update policy. To set additional policy options see SetProperty

5. CreateUpdatePolicyViaUpdates

Creates a Software Update policy based on list of updates.

6. CreateWindowsUpdateAssessmentTask

Creates a 'Windows Software Update Assessment' task.

7. CreateWindowsUpdateInstallationTask

Creates a 'Windows Software Update Installation' task.

8. DisableBulletins

Disables provided bulletins and removes them from policies (optionally).

9. EditSolarisUpdateInstallationTask

Updates a "Solaris Update Installation" task.

10. EditWindowsUpdateAssessmentTask

Updates 'Windows Software Update Assessment" task.

11. EditWindowsUpdateInstallationTask

Edits the 'Windows Software Update Installation' task.

12. EnsureStaged

Ensures the list of bulletins (and its updates) is staged.

13. GetAllStagedUpdates

Returns the list of ALL staged updates.

14. GetCustomSeverities

Returns the list of Patch Custom Severities as comma separated entries: <Order>|< Name>|<Level>, …

15. GetCustomSeverityLevels

Gets IDs of custom severities.

16. GetDistributionTaskStatus

Returns current "Distribute Software Updates" task status.

17. GetNonstagedUpdates

Returns the list of non-staged updates for provided bulletins.

18. GetPackageServerGuid

Obtains list of Package Servers and returns GUID of the first non-constrained.

19. GetPreImportStatus

Returns the status of pre-import for particular Patch Meta Data import task.

20. GetPreImportStatusVerbose

Returns the verbose status of pre-import for particular Patch Meta Data import task.

21. GetProperty

Very generic API to get property of any NS item.

22. GetStagedUpdates

Returns list of staged updates for provided bulletins.

23. GetTaskInstanceStatus

Returns current statis for any task. Also see GetStagingTaskStatus or GetDistributionTaskStatus

24. GetTaskRunningInstances

Returns the GUID list of all task instances, which are running for particular task.

25. GetWindowsPreImportStatus

Returns the status of pre-import of "Import Patch Data for Windows".

26. GetWindowsPreImportStatusVerbose

Returns the verbose status of pre-import of the "Import Patch Data for Windows" task. Same as GetPreImportStatusVerbose, but no parameters required

27. IsSoftwareUpdateDistributionRunning

Returns status of "Distribute Software Updates" task.

28. IsStaged

Checks if ALL provided bulletins and updates are staged.

29. IsStagingTaskRunning

Checks if 'Download Software Update Package' task is running.

30. IsTaskRunning

Checks if particular NS task have running instances.

31. MyPrivileges

Returns list of all privileges, granted for the current API user.

32. OperatePatchWorker

Manages execution of specified 'Import Patch Data' task for different platforms. For example: it can start or stop the task.

33. ResolveToPolicies

Gets the GUID list of policies, created for listed bulletins or updates.

34. ResolveToUpdates

Gets the GUID list of all updates for provided bulletins.

35. RunPatchWorker

Starts provided 'Import Patch Data for ...' task.

36. RunPreImport

Runs the pre-import for particular Patch Meta Data import task .

37. RunTask

Runs any NS task (with its current settings).

38. RunWindowsPreImport

Runs the pre-import part for Windows Patch Meta Data import task.

39. SetAdvertisementCustomCmdLine

Sets custom command line for SoftwareUpdateAdvertisement.

40. SetGuidCollectionProperty

Generic API to change assigned list of objects to provided property. Another generic method : see SetProperty

41. SetPluginPolicyMessages

Changes the Patch plugin policy messages (defined in the Notification tab of the policy).

42. SetPluginPolicyMicrosoftUpdateOptions

Sets options for provided 'Microsoft Update Configuration' policies.

43. SetPluginPolicySchedules

Changes Patch plugin policy schedules.

44. SetProperties

Very generic API to change properties of NS items.

45. SetProperty

Very generic API to change one property of NS items. To set list of objects as value see SetGuidCollectionProperty

46. SetSeverityLevel

Changes the bulletin severity.

47. SetSoftwareUpdatePolicySchedule

Changes the Software Update policy scheduling.

48. SetSoftwareUpdatePolicyTargets

Changes the targets for policies.

49. SetupImport

Change Windows import task settings

50. SetupPreImport

Changes the pre-import settings for Patch Meta Data import task.

51. SetupWindowsPreImport

Setup pre-import properties of "Import Patch Data for Windows" task

52. StopPatchWorker

Stops execution of provided 'Import Patch Data for ...' task.

53. StopPreImport

Attempts to stop pre-import, if it is runing.

54. StopWindowsPreImport

Same as StopPreImport, but does not require parameters.

55. UpdateResourceTargets

Updates all resource targets belonging to particular product.

56. UpdateSoftwareUpdatePolicy

Revises Software Update policies with vendor changes.

Methods

1. AddGuids(System.String,System.String,System.String,System.Boolean)

This is generic API to append GUID or list of GUID's to some property of NS item.

Parameters (in order of usage):

NameDescription
guidItemthe GUID of NS item, which we want to modify
nameproperty name in the NS item to modify
guidListcomma separated list of GUIDs to add to the property
setbackboolean, set to 'true' if resulting GUID collection should be set back to NS item at once

Return value: 'true' on success, 'false' on fail

2. CreateAgentPluginPolicy(System.String,System.String,System.String,System.String)

Creates Patch Agent Plugin policy.

Gets the 'Default Software Update Plug-in Policy' item, clones it and sets the new name.

Parameters (in order of usage):

NameDescription
strName[optional] name of the new policy
productGuid[not supported] leave empty to use 'Patch Core' product
parentFolderGuid[optional] GUID of the parent folder of the policy (leave empty to use folder of 'Default Software Update Plug-in Policy')
targetGuidsGUID list of resource targets to apply policy for. See functions like 'CreateResourceTarget' of platform API (Scoping Management) to manage targets

Return value: GUID of created policy

3. CreateSolarisUpdateInstallationTask(System.String,System.Boolean,System.String,System.String)

Released in: 8.5 RU3

Creates "Solaris Update Installation" task.

Parameters (in order of usage):

NameDescription
taskName[optional] name of the created task
useCustomCommandLineboolean, set 'true' for using custom command line and 'false' for default command line
customCommandLine[optional] string, custom command line that gets appended to 'pkg update' command. Optional with 'useCustomcommandLine' set to 'false'
folderGuid[optional] parent folder for created task, default is "Tasks→Jobs and Tasks→System Jobs and Tasks→Software→Patch Management→Solaris"

Return value: GUID of the created task

see also: EditSolarisUpdateInstallationTask

4. CreateUpdatePolicy(System.String,System.String,System.String,System.Boolean)

Creates a Software Update policy. To set additional policy options see SetProperty

Parameters (in order of usage):

NameDescription
namename of the new policy item
bulletinGuidsGUID list of bulletins to include
targetGuids[optional] GUID list of the Resource Targets to apply policy for
enabled'true' if policy should be enabled

Return value: GUID of the created policy

see also: CreateUpdatePolicyViaUpdates

see also: SetProperty

5. CreateUpdatePolicyViaUpdates(System.String,System.String,System.String,System.Boolean)

Released in: 8.5 RU1

Creates a Software Update policy based on list of updates.

Depending on list of updates - usual or partially staged (if only part of updates from a bulletin selected) policy will be created.

Parameters (in order of usage):

NameDescription
namename of the new policy item
updateGuidsGUID list of updates to include
targetGuids[optional] GUID list of the Resource Targets to apply policy for
enabled'true' if policy should be enabled

Return value: GUID of the created policy

see also: CreateUpdatePolicy

6. CreateWindowsUpdateAssessmentTask(System.String,System.String,System.String)

Released in: 8.5 RU3

Creates a 'Windows Software Update Assessment' task.

Parameters (in order of usage):

NameDescription
taskName[optional] name of the created task
updateGuidsGUID list of updates to include
folderGuid[optional] parent folder for created task, default is "Tasks→Jobs and Tasks→System Jobs and Tasks→Software→Patch Management"

Return value: GUID of the created task

see also: CreateWindowsUpdateInstallationTask

see also: EditWindowsUpdateAssessmentTask

7. CreateWindowsUpdateInstallationTask(System.String,System.String,System.Boolean,System.String)

Released in: 8.5 RU3

Creates a 'Windows Software Update Installation' task.

Parameters (in order of usage):

NameDescription
taskName[optional] name of the created task
updateGuidsGUID list of updates to include
supressRebootDemand'true' for "Suppress restart during task execution", 'false' for "Restart if required at the end of task execution"
folderGuid[optional] parent folder for created task, default is "Tasks→Jobs and Tasks→System Jobs and Tasks→Software→Patch Management"

Return value: GUID of the created task

see also: CreateWindowsUpdateAssessmentTask

see also: EditWindowsUpdateInstallationTask

8. DisableBulletins(System.String,System.Boolean)

Released in: 8.5

Disables provided bulletins and removes them from policies (optionally).

Parameters (in order of usage):

NameDescription
bulletinGuidsGUID list of bulletins
deletePoliciesset 'true' to delete provided bullletins from policies or 'false' for leaving included (in disabled state)

Return value: 'true' on success

9. EditSolarisUpdateInstallationTask(System.String,System.String,System.String,System.String,System.String)

Released in: 8.5 RU3

Updates a "Solaris Update Installation" task.

Note: to get values of current properties use API function GetProperty and propery names: "UseCustomCommandLine" and "CustomCommandLine"

Parameters (in order of usage):

NameDescription
guidTaskGUID of a "Solaris Update Installation" task
taskName[optional] new name for edited task
useCustomCommandLine[optional] boolean, true is using custom command line and false if use default command line
customCommandLine[optional] string, value of custom command line. Parameter is optional in case 'useCustomcommandLine' equal to 'false'
folderGuid[optional] new parent folder for task

Return value: GUID of the updated task

see also: CreateSolarisUpdateInstallationTask

10. EditWindowsUpdateAssessmentTask(System.String,System.String,System.String,System.String)

Released in: 8.5 RU3

Updates 'Windows Software Update Assessment" task.

Parameters (in order of usage):

NameDescription
guidTaskGUID of a 'Windows Update Assessment' task
taskName[optional] new name for edited task
updateGuids[optional] update GUID(s) as comma-delimited string
folderGuid[optional] new parent folder for task

Return value: GUID of the updated task

see also: CreateWindowsUpdateAssessmentTask

11. EditWindowsUpdateInstallationTask(System.String,System.String,System.String,System.String,System.String)

Released in: 8.5 RU3

Edits the 'Windows Software Update Installation' task.

No need to supply all parameters (guidTask - mandatory), only one can be changed

Parameters (in order of usage):

NameDescription
guidTaskGUID of a 'Windows Update Installataion' task
taskName[optional] new name for edited task
updateGuids[optional] update GUID(s) as comma-delimited string
supressRebootDemand[optional] 'true' for "Suppress restart during task execution" option, 'false' for "Restart if required at the end of task execution"
folderGuid[optional] new parent folder for task

Return value: GUID of the updated task

see also: CreateWindowsUpdateInstallationTask

12. EnsureStaged(System.String,System.Boolean)

Ensures the list of bulletins (and its updates) is staged.

NB! EnsureStaged does not handle bulletin Enabled/Disabled state!

Parameters (in order of usage):

NameDescription
bulletinGuidsGUID list of bulletins to get staged
sync'true' to wait until everything is staged. 'false' – to let the staging to run asynchronously

Return value: count of updates to be staged or -1 on error

Example:

            'EnsureStaged' is not equal to UI action 'Download packages' performed on the bulletin. While it downloads updates if needed - bulleting is not automatically enabled.
            So the bulletin state 'Staged' isn't equal to 'Enabled'
            To receive same result as for 'Download packages' UI action for a disabled bulletin:
            1. Call 'EnsureStaged' for the bulletin
            2. Call 'SetProperty' with property name: IsDisabledByUser and value: false
            3. Call 'SetProperty' with property name: Enabled and value: true
            

13. GetAllStagedUpdates

Returns the list of ALL staged updates.

NB! Might be very long and not to fit into the SOAP string size limitation

Return value: list of comma delimited GUIDs

see also: GetStagedUpdates

14. GetCustomSeverities

Returns the list of Patch Custom Severities as comma separated entries: <Order>|< Name>|<Level>, …

Example:

            1|My Severity One|602,2|My Severity Two|315
            

15. GetCustomSeverityLevels

Gets IDs of custom severities.

Return value: comma separated list of severities' IDs (integer)

16. GetDistributionTaskStatus

Returns current "Distribute Software Updates" task status.

The status(Altiris.TaskManagement.Common.TaskInstanceStatus) can be:

Return value: status of fisrt active instance of the task or empty string (with no active instances)

see also: IsSoftwareUpdateDistributionRunning

17. GetNonstagedUpdates(System.String)

Returns the list of non-staged updates for provided bulletins.

Parameters (in order of usage):

NameDescription
bulletinGuidsGUID list of bulletins to be checked

Return value: list of comma separated update GUIDs or empty string

see also: GetStagedUpdates

18. GetPackageServerGuid

Obtains list of Package Servers and returns GUID of the first non-constrained.

Return value: GUID of the first non-constrained Package Сerver

19. GetPreImportStatus(System.String)

Returns the status of pre-import for particular Patch Meta Data import task.

Use GUID 'C27DBB50-6DDF-4125-87C1-D8F5B588491D' for 'Import Patch Data for Windows' task. Linux tasks are not supported

Parameters (in order of usage):

NameDescription
guidTaskGUID of the Patch Import task to check pre-import status for

Return value:

see also: GetWindowsPreImportStatus

20. GetPreImportStatusVerbose(System.String)

Returns the verbose status of pre-import for particular Patch Meta Data import task.

Parameters (in order of usage):

NameDescription
guidTaskGUID of the Patch Import task to check pre-import status for. See GetPreImportStatus

Return value: returns the verbose task status as string

see also: GetWindowsPreImportStatusVerbose

see also: GetPreImportStatus

21. GetProperty(System.String,System.String)

Very generic API to get property of any NS item.

Parameters (in order of usage):

NameDescription
guidItemGUID of NS item
nameproperty to get value for

Return value: string with the property value

see also: SetProperty

22. GetStagedUpdates(System.String)

Returns list of staged updates for provided bulletins.

Parameters (in order of usage):

NameDescription
bulletinGuidsGUID list of bulletins

Return value: list of comma separated updates GUIDs or empty string

see also: GetNonstagedUpdates

23. GetTaskInstanceStatus(System.String)

Returns current statis for any task. Also see GetStagingTaskStatus or GetDistributionTaskStatus

Generic method. Use '99b6a96a-f0a2-40fa-88bb-9ddfa97b4ddf' to check "Distribute Software Updates" task or '3d500009-23aa-477c-82a5-8b707c9f8c29' for "Download Software Update Package" task.

Status (Altiris.TaskManagement.Common.TaskInstanceStatus) can be:

Parameters (in order of usage):

NameDescription
guidTaskGUID of the task to check status for

Return value: status of fisrt active instance of the task or empty string (with no active instances)

see also: GetStagingTaskStatus

see also: GetDistributionTaskStatus

24. GetTaskRunningInstances(System.String)

Returns the GUID list of all task instances, which are running for particular task.

Generic method. Use '99b6a96a-f0a2-40fa-88bb-9ddfa97b4ddf' to check "Distribute Software Updates" task or '3d500009-23aa-477c-82a5-8b707c9f8c29' for "Download Software Update Package" task.

Parameters (in order of usage):

NameDescription
guidTaskGUID of the task to list running instances for

Return value: comma-delimeted GUID list of active task's instances

25. GetWindowsPreImportStatus

Returns the status of pre-import of "Import Patch Data for Windows".

Same as GetPreImportStatus, but no parameters required

Return value:

26. GetWindowsPreImportStatusVerbose

Returns the verbose status of pre-import of the "Import Patch Data for Windows" task. Same as GetPreImportStatusVerbose, but no parameters required

Return value: returns the verbose task status as string

Example:

Variations of output:
            Import of available vendors, software and languages: completed.
            Import of available vendors, software and languages: not started.
            Import of available vendors, software and languages: running.
            Import of available vendors, software and languages: stop requested.
            Import of available vendors, software and languages: failed.
            

see also: GetPreImportStatusVerbose

27. IsSoftwareUpdateDistributionRunning

Returns status of "Distribute Software Updates" task.

Return value: 'true' if any instance of the "Distribute Software Updates" task is running, 'false' if all task instances are finished or not started

see also: GetDistributionTaskStatus

28. IsStaged(System.String)

Checks if ALL provided bulletins and updates are staged.

Parameters (in order of usage):

NameDescription
bulletinGuidsGUID list of bulletins (and/or updates) to be checked

Return value: 'true' for all the updates staged, 'false' if any of requested is not staged

29. IsStagingTaskRunning

Checks if 'Download Software Update Package' task is running.

Return value: 'true' if any instance of the "Download Software Update Package" task is running, 'false' if all task instances are finished or not started

see also: GetStagingTaskStatus

30. IsTaskRunning(System.String)

Checks if particular NS task have running instances.

Generic method. Use '99b6a96a-f0a2-40fa-88bb-9ddfa97b4ddf' to check "Distribute Software Updates" task or '3d500009-23aa-477c-82a5-8b707c9f8c29' for "Download Software Update Package" task.

Parameters (in order of usage):

NameDescription
guidTaskGUID of the task to check status for

Return value: 'true' if any instance of the task is running, 'false' if all task instances are finished or not started

see also: IsSoftwareUpdateDistributionRunning

see also: IsStagingTaskRunning

31. MyPrivileges

Returns list of all privileges, granted for the current API user.

Return value: GUID list of granted privileges

32. OperatePatchWorker(System.String,System.String,System.Boolean)

Manages execution of specified 'Import Patch Data' task for different platforms. For example: it can start or stop the task.

Parameters (in order of usage):

NameDescription
workerGuidGUID of the 'Import Patch Data for ...' task
commandCommand to execute: "run", "stop", "status", "progress", "verbose" and "message"
asyncBoolean flag to make asynchronous execution.

Return value: Status of task as string

Example:

            Use '1D4F02E9-C667-41E5-B1A4-6F08D30E1661' as 'workedGuid' parameter and 'run' as 'command' parameter to run 'Import Patch Data for SUSE' task
            

see also: RunPatchWorker

see also: StopPatchWorker

33. ResolveToPolicies(System.String)

Gets the GUID list of policies, created for listed bulletins or updates.

Parameters (in order of usage):

NameDescription
bulletinGuidsGUID list of bulletins or updates to be checked

Return value: comma separated GUID list of policies

34. ResolveToUpdates(System.String)

Gets the GUID list of all updates for provided bulletins.

Parameters (in order of usage):

NameDescription
bulletinGuidsGUID list of bulletins to be checked

Return value: comma separated GUID list of updates.

35. RunPatchWorker(System.String,System.Boolean)

Starts provided 'Import Patch Data for ...' task.

Command is similar to 'run command' for OperatePatchWorker

Parameters (in order of usage):

NameDescription
workerGuidGUID of the 'Import Patch Data for ...' task to be run.
asyncBoolean flag to make asynchronous execution

Example:

Use '1D4F02E9-C667-41E5-B1A4-6F08D30E1661' as 'workedGuid' parameter to run 'Import Patch Data for SUSE' task

see also: StopPatchWorker

36. RunPreImport(System.String)

Runs the pre-import for particular Patch Meta Data import task .

Parameters (in order of usage):

NameDescription
guidTaskGUID of import task to run pre-import for

37. RunTask(System.String,System.String)

Runs any NS task (with its current settings).

Parameters (in order of usage):

NameDescription
guidTaskGUID of task to execute
instanceNameString for custom instance name, empty for default

38. RunWindowsPreImport

Runs the pre-import part for Windows Patch Meta Data import task.

39. SetAdvertisementCustomCmdLine(System.String,System.String)

Sets custom command line for SoftwareUpdateAdvertisement.

NB! If change did not succeed - advertisment will be set to disableBySystem or Disabled, depends on whether it has been previously disabled.

Parameters (in order of usage):

NameDescription
AdvertGuidGUID of the Advertisement
cmdLinenew command line

Return value: 'true' for successful change, 'false' if advertisement is not found

40. SetGuidCollectionProperty(System.String,System.String,System.String)

Generic API to change assigned list of objects to provided property. Another generic method : see SetProperty

Parameters (in order of usage):

NameDescription
itemGuidsGUID list of NS items
nameproperty name
valueGuidsGUID list of values

Return value: 'true' on success

41. SetPluginPolicyMessages(System.String,System.Boolean,System.String,System.String,System.String,System.String,System.String)

Changes the Patch plugin policy messages (defined in the Notification tab of the policy).

Applicable only for a '... Software Update Plug-in Policy'

Parameters (in order of usage):

NameDescription
policyGuidsList of GUIDs of policies to set messages for
turnOnNonEmptySet to 'true' if provided message should be validated for empty string
msgUpdatePending[optional] text for Software Update Installation Notification message
msgUpdateProgress[optional] text for Software Update Installation Progress message
msgRebootPending[optional] text for Software Update Restart Notification message
msgRebootReminder[optional] text for Reboot reminder message
msgRebootNotification[optional] text for user deferral notification

Return value: true

Example:

            To set 'Software Update Installation Progress' message of 'Default Software Update Plug-in Policy'
            use following params: 'policyGuids' - 0D1CB0D4-B256-44DA-A74D-D7FB68364D29, 'turnOnNonEmpty' - 'true' and  'msgUpdateProgress' - 'Example of message'.
            It is not possible to programmatically switch off a message or empty it.
            

see also: SetPluginPolicySchedules

see also: SetPluginPolicyMicrosoftUpdateOptions

42. SetPluginPolicyMicrosoftUpdateOptions(System.String,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean)

Released in: 8.5

Sets options for provided 'Microsoft Update Configuration' policies.

Parameters (in order of usage):

NameDescription
policyGuidsGUIDs of policies to modify
enableConfiguration'true' to enable control over download and installation of updates by Windows Update Agent, disabling automatic download and installation
enableAutoUpdate'false' to disallow Windows Update to install updates automatically
enablePeer2Peer'true' to download updates from local computers only
enablePeer2PeerOverInternet'true' to download updates over Internet
enableNonOsUpdates'true' to download and install updates for Microsoft products other than Windows (e.g. Microsoft Office)

see also: SetPluginPolicyMessages

43. SetPluginPolicySchedules(System.String,System.String,System.String,System.String)

Changes Patch plugin policy schedules.

Applicable only for Patch '... Software Update Plug-in Policy'.

NB! The schedule XML should be valid NS7 schedule, it can be found by viewing scheduled policy's XML. PS! making the flexible scheduling API seem to be much more complicated and not worth the effort

Parameters (in order of usage):

NameDescription
policyGuidsList of GUIDs of policies to change
clientSoftwareUpdateSchedule[optional] XML string with schedule info
notifySchedule[optional] XML string with schedule info
rebootSchedule[optional]XML string with schedule info

Return value: true

Example:

Example of everyday schedule with start at 8:00AM: <schedule start="2008-01-01" tz="Local"><trigger dates="" months="" at="08:00:00" exact="True" type="Daily" repetition="" weekdays="" weeks="" duration=""/></schedule>

see also: SetPluginPolicyMessages

44. SetProperties(System.String,System.String)

Released in: 8.5

Very generic API to change properties of NS items.

NB! The name-value list format is: <name>=<value>,<name>=<value>,…

Please see some examples in SetProperty

Parameters (in order of usage):

NameDescription
guidItemThe GUID of NS item, which we want to modify
nameValueListList of name-value pairs

see also: SetProperty

45. SetProperty(System.String,System.String,System.String)

Very generic API to change one property of NS items. To set list of objects as value see SetGuidCollectionProperty

Parameters (in order of usage):

NameDescription
itemGuidsGUID list of NS items to change
nameName of the property to change
valueValue to set

Return value: 'true' if success

Example:

            To set some options of Patch policy you should set property of the policy to:
            - 'Run ASAP' option of Patch policy, you should set property with name 'CurrentAdvertismentSet.InstallOptions' to value 1 (0 - default,  1- RunASAP, 2 - Scheduled)
            - 'Use multicast' - use name 'CurrentAdvertismentSet.UseMulticast' with values 0 – disable, 1 – enable
            - 'Override Maintenance Windows settings' - use name 'CurrentAdvertismentSet.OverrideMaintenanceWindows' and 'true'/'false' as value
            - 'Allow immediate restart if required ' - use name 'CurrentAdvertismentSet.RebootOptions' and values 1 to set the flag and 0 to clear it
            

46. SetSeverityLevel(System.String,System.Int32)

Changes the bulletin severity.

Parameters (in order of usage):

NameDescription
itemGuidsGUID list of bulletins to be modified
levelSeverity level

47. SetSoftwareUpdatePolicySchedule(System.String,System.String)

Changes the Software Update policy scheduling.

NB! The schedule XML should be valid NS7 schedule, it can be found by viewing scheduled policy's XML.

Parameters (in order of usage):

NameDescription
policyGuidsGUID list of policies to be modified
installScheduleNS schedule XML string

Return value: true

see also: SetPluginPolicySchedules

48. SetSoftwareUpdatePolicyTargets(System.String,System.String)

Changes the targets for policies.

Parameters (in order of usage):

NameDescription
policyGuidsGUID list of policies to be modified
targetGuidsGUID list of resource targets to set to policy

Return value: true

Example:

             Suggested way to dynamicaly manage list of computers in policy targets through API:
             1. Create a resource filter (http://localhost/Altiris/ASDK.NS/CollectionManagementService.asmx?op=CreateResourceCollection)
             
             2. Create target based on collection guid (http://localhost/Altiris/ASDK.NS/ScopingManagementService.asmx?op=CreateResourceTarget)
             Use xml like: <resourceTarget><name>My custom targer</name><baseOrganizationalGroupGuid>91c68fcb-1822-e793-b59c-2684e99a64cd</baseOrganizationalGroupGuid><targetFilters><targetFilter><type>resource collection</type><operation>Intersect</operation><resourceCollectionGuid>!GUID-of-Created-Filter!</resourceCollectionGuid></targetFilter></targetFilters></resourceTarget>
            
             3. Update the filter as needed by adding/removing items (e.g.http://localhost/Altiris/ASDK.NS/CollectionManagementService.asmx?op=AddInclusions).
             See more details in ASDK documentation (c:\Program Files\Altiris\Altiris ASDK\Help\ASDK8.5.chm ) for ‘CollectionManagementLib Members’
             

49. SetupImport(System.String,System.String)

Change Windows import task settings

Parameters (in order of usage):

NameDescription
softwareExcludesGUID list of excluded software releases
localeIncludesGUID list of locales (languages) to import

50. SetupPreImport(System.String,System.String,System.String,System.String)

Changes the pre-import settings for Patch Meta Data import task.

Now it is applicable to "Import Patch Data for Windows" task pre-import settings only. Use SetupWindowsPreImport instead of this function.

Parameters (in order of usage):

NameDescription
guidTaskGUID of the task to modify
strMiniCabDownloadUrlURL of the pre-import cab file
strUserNameUser name to access pre-import cab
strPasswordPassword of the user to access pre-import cab

Return value: 'true' on success, 'false' on failure

see also: SetupWindowsPreImport

51. SetupWindowsPreImport(System.String,System.String,System.String)

Setup pre-import properties of "Import Patch Data for Windows" task

Parameters (in order of usage):

NameDescription
strMiniCabDownloadUrlURL of the pre-import cab file
strUserNameUser name to access pre-import cab
strPasswordPassword of the user to access pre-import cab

Return value: 'true' on success, 'false' on otherwise

52. StopPatchWorker(System.String)

Stops execution of provided 'Import Patch Data for ...' task.

Parameters (in order of usage):

NameDescription
workerGuidGUID of running 'Import Patch Data for ...' task

Return value: 'true' on success

see also: RunPatchWorker

see also: OperatePatchWorker

53. StopPreImport(System.String)

Attempts to stop pre-import, if it is runing.

Parameters (in order of usage):

NameDescription
guidTaskGUID of the task to stop pre-import for (one of the Patch Meta Data import tasks)

54. StopWindowsPreImport

Same as StopPreImport, but does not require parameters.

55. UpdateResourceTargets(System.String)

Updates all resource targets belonging to particular product.

In Patch solution there are following products included:

Parameters (in order of usage):

NameDescription
guidProductGUID of the product

Return value: count of updated targets or '-1' on error

Example:

            Bellow is aproximate list of targets per product. List of targets will depend on specific configuration of ITMS.
            

Core (C6D19F78-1434-49AC-BEC8-D18255E99F57): - All Computers without Software Update Plug-in Installed Target - Computers with inconsistent Patch WUA assessment data - All Computers requiring Software Update Plug-in Upgrade Target - Computers with inconsistent Patch assessment data - All Computers with Software Update Plug-in Installed Target

Windows (B1338338-5575-4A27-9808-23BEC40D79FA): - Windows Computers without Software Update Plug-in Installed Target - Windows Computers with Software Update Plug-in Installed Target - Windows Computers Requiring Software Update Plug-in Upgrade Target - Supported Microsoft Update computers target - Default Software Update Plug-in Policy Target

Linux (AACD4DA3-AC4F-4F44-9477-EEE8D2DF323C): - Linux Computers Requiring Software Update Plug-in Upgrade Target - Linux Computers Requiring Software Update Plug-in Upgrade with up-to-date Symantec Management Agent Target - Linux Computers with Software Update Plug-in Installed Target - All Patchable Red Hat Computers - All Patchable CentOs Computers - All Patchable SUSE Computers - Linux Computers without Software Update Plug-in Installed Target

Mac (C6B52EC2-597C-4EFE-8830-B92F11888A4A): - All Patchable Mac Computers Target

see also: SetSoftwareUpdatePolicyTargets

56. UpdateSoftwareUpdatePolicy(System.String,System.Boolean)

Revises Software Update policies with vendor changes.

Parameters (in order of usage):

NameDescription
policyGuidsList of the Software Update policy GUIDs
enableNewAdvertsSet to 'true' to automatically enable distribution of newly added software updates

Return value: always 'true'