Sophos Mobile Control
Web service guide
Product version:
3.5
w.utimaco.com
Contents
1 About Sophos Mobile Control ... 3
Web service guide
3 3
1 About Sophos Mobile Control
Sophos Mobile Control is a device management solution for mobile devices like smartphones and tablets. It allows configuration and software distribution as well as security settings and many other device management operations on mobile devices.
Sophos Mobile Control
4
2 Prerequisites
To use the web service, you need a Sophos Mobile Control user account. These accounts consist of the following information:
Web service guide
5 5
3 Server-side implementation
The server-side portion of the web service runs inside the Java EE application Server JBoss 4.2.3 GA. The web service stack in use is JBoss-WS-CXF (version 3.1.1 GA) and is based on JAX-WS. The web service is defined to use the following options:
Style “Document” Use “Literal”
Sophos Mobile Control
6
4 Client-side implementation
The web service definition is provided as a standard WSDL file. This file lists the available operations and entities and serves as the basis for the generation of the necessary web service client stubs.
All major programming languages offer tools for the automated generation of the client stubs.
The web service client needs to be set to maintain the session across different calls. This may or not be the default behavior depending on the web service client framework in use.
The webservice is available at https://[hostname]/mdmWebservice.
Web service guide
7 7
5 Available entities
Notes:
Access types for the entities: r: read only
w: write only
rw: read and write Links to entities:
If the value is a link to an entity, you can edit the link to an existing entity, but not the nested entity itself
5.1 WsAdminUser
Represents admin users for customers including the following attributes:
Type Value Mandatory Access
Integer id r
String user name Required,
length 1 to 100
rw
String last name Required,
length 1 to 100
rw
String first name Required,
length 1 to 100
rw
String email Required,
length 1 to 100
rw
String password w
WsAdminUserProperty[] properties rw
Sophos Mobile Control
8
5.2 WsAdminUserProperty
To set new WsAdminUserProperties, you have to get the existing WsAdminUserProperties from the selected WsAdminUser and add the new Properties to this array. Afterwards you have to save the WsAdminUser. Represents admin user properties including the following attributes:
Type Value Mandatory Access
String key Required,
length 1 to 100
rw
String value required,
length 1 to 65535
rw
5.3 WsAndroidProfile
Represents profiles for android devices including the following attributes:
Type Value Mandatory Access
Integer id r
String name Required,
length 1 to 100
rw
String description Required,
length 1 to 255
rw
String version Required,
Web service guide
9 9
5.4 WsComplianceCriterion
Represents compliance criteria for compliance sets including the following attributes:
Type Value Mandatory Access
WsComplianceCriterionType link to criterion type Required rw String value of criterion type Required, length 1 to 65535 rw WsOperatingSystemPlatform link to platform Required rw Map<WsComplianceCriterionAction Type, WsComplianceCriterion Action> link of type to actions rw
5.5 WsComplianceCriterionAction
Represents compliance criterion actions for compliance sets including the following attributes:
Type Value Mandatory Access
WsComplianceCriterion ActionType
link to type Required rw
String value Required,
length 1 to 65535
rw
5.6 WsComplianceCriterionActionType
Represents compliance criterion action types for compliance criterion actions including the following static attributes:
Type Value Access
WsComplianceCriterionActionType disallow_eas_traffic, email_admin, transfer_taskbundle
r
Sophos Mobile Control
10
5.7 WsComplianceCriterionType
Represents compliance criterion types for compliance criterion actions including the following static attributes:
Type Value Access
WsComplianceCriterionType general_managed, general_min_osversion, general_min_clientversion, general_max_client_sync_gap, general_blacklisted_apps, general_whitelisted_apps, general_mandatory_apps, general_passcode_present, general_data_roaming_enabled, general_voice_roaming_enabled, general_smsec_max_scan_gap, general_smsec_malware_allowed, general_smsec_suspicious_allowed, general_smsec_unwanted_allowed, android_root_allowed, android_nonmarket_allowed, android_encryption_active, android_adb_allowed, ios_jailbreak_allowed, ios_max_app_sync_gap, ios_mandatory_profiles, ios_encryption_active, ios_app_locate_active wp_max_app_sync_gap wp_encryption_active r
5.8 WsComplianceSet
Represents compliance sets for devices including the following attributes:
Type Value Mandatory Access
Integer id r
String name Required,
length 1 to 255
rw
String description Required,
Web service guide
11 11
Type Value Mandatory Access
boolean iOS enabled rw
boolean symbian enabled rw boolean windows mobile enabled rw boolean windows phone enabled rw WsComplianceCriterion[] compliance criteria rw
5.9 WsComplianceViolation
Represents compliance violations for devices including the following attributes:
Type Value Mandatory Access
String type r
String info r
Boolean disallow active sync
r
Date insert Date r
5.10 WsCustomer
Represents customers including the following attributes:
Type Value Mandatory Access
Integer id r
String name Required,
length 1 to 100
rw
String external id Required,
Sophos Mobile Control
12
Type Value Mandatory Access
surname String technical contact email Max. length 100 rw String technical contact phone number Max. length 100 rw String technical contact mobile number Max. length 100 rw String technical contact addit. info Max. length 100 rw WsCustomerProperty[] customer properties Required rw
5.11 WsCustomerProperty
To add new WsCustomerProperties, you have to get the existing WsCustomerProperties from the selected WsCustomer and add the new Properties to this array. Afterwards you have to save the WsCustomer. Represents customer properties including the following attributes:
Type Value Mandatory Access
String key Required,
length 1 to 100
rw
String value Max. length 65535 rw
Web service guide
13 13
5.12 WsDeletedDevice
Represents deleted devices including the following attributes:
Type Value Mandatory Access
Integer device id r String name r String description r String operating system name r
String phone number r
String serial number r
Date date of deletion r
5.13 WsDevice
Represents devices including the following attributes:
Type Value Mandatory Access
Integer id r
String name Required,
length 1 to 100
rw
String description Required,
length 1 to 65535
rw
String email address Length 1 to 100 rw
WsDeviceGroup link to device
group Required rw WsOperatingSystem link to operating system Required rw
Date last sync date rw
Boolean managed status rw
Sophos Mobile Control
14
Type Value Mandatory Access
String phone number Required,
length 1 to 100
rw
5.14 WsDeviceGroup
Represents device groups including the following attributes:
Type Value Mandatory Access
Integer id r
String name Required,
length 1 to 100
rw
String description Required,
length 1 to 100 rw WsComplianceSet link to compliance set for corporate devices Required rw WsComplianceSet link to compliance set for employee devices Required rw
5.15 WsDeviceProperty
To add new WsDeviceProperties, you have to get the existing WsDeviceProperties from the selected WsDevice and add the new Properties to this array. Afterwards you have to save the WsDevice. Represents device properties including the following attributes:
Type Value Mandatory Access
String key Required,
length 1 to 100
rw
String value Required,
length 1 to 65535
rw
Web service guide
15 15
5.16 WsDeviceTemplate
Represents device templates including the following attributes:
Type Value Mandatory Access
String id r
String name r
WsOperationSystem link to operating
system
r
5.17 WsInstalledIOSProfile
Represents iOS configuration profiles installed on devices including the following attributes:
Type Value Mandatory Access
String payload identifier r String payload description r
String payload display
name
r
String payload organization
r
String payload UUID r
String payload version r
Boolean is encrypted r
Boolean is managed r
Boolean has removal
passcode
r
Boolean payload removal
disallowed
r
Sophos Mobile Control
16
5.18 WsInstalledIOSProvisioningProfile
Represents iOS provisioning profiles installed on devices including the following attributes:
Type Value Mandatory Access
String payload name r
String payload UUID r
String expiry date r
5.19 WsInstalledSoftware
Represents software packages installed on devices including the following attributes:
Type Value Mandatory Access
String name r
String identifier r
String version r
Integer app size r
Integer data size r
5.20 WsInternalSSPUser
Represents internal SSP users including the following attributes:
Type Value Mandatory Access
String last name Required,
length 1 to 100
rw
String first name Required,
length 1 to 100
rw
String user name Required,
length 1 to 100
rw
String phone number Required,
length 1 to 100
rw
String email Required,
length 1 to 100
Web service guide
17 17
Type Value Mandatory Access
String GUID r
String common name r
String distinguished name
r
5.21 WsIOSProfile
Represents profiles for IOS devices including the following attributes:
Type Value Mandatory Access
Integer id r
String name Required,
length 1 to 100
rw
String description Required,
length 1 to 100
rw
String version Required,
length 1 to 100
rw
WsOperatingSystem[] link to operating
system
Required, min. elements 1
rw
byte[] profile content Required,
length 1 to 65535
rw
5.22 WsOperatingSystem
Represents operating systems including the following attributes:
Type Value Mandatory Access
Integer id r
String name r
String version r
Sophos Mobile Control
18
5.23 WsOperatingSystemPlatform
Represents operating system platforms including the following static attributes:
Type Value Access
WsOperatingSystemPlatform android, symbian, windowsmobile, windowsphone, iphone, blackberry, other r
5.24 WsSoftware
Represents software packages for WsDevice including the following attributes. Either file content and file name or just the file link must be set.
Type Value Mandatory Access
Integer id r
String name Required,
length 1 to 100
rw
String description Required,
length 1 to 255
rw
String version Required,
length 1 to 100
rw
WsOperatingSystem[] link to operating
systems
Required, min. elements 1
rw
byte[] file content Max. size 10 MB rw
String file name Max. length 255 rw
String file link Max. length 255 rw
Web service guide
19 19
5.25 WsTaskBundle
Represents task bundles including the following attributes:
Type Value Mandatory Access
Integer id r
String name Required,
length 1 to 100
rw
String version Required,
length 1 to 100
rw
WsOperatingSystem[] link to operating
systems
Required, min. elements 1
rw
WsTaskBundleTask[] tasks Required, min. elements 1
rw
5.26 WsTaskBundleTask
Represents task bundle tasks for task bundles defined on the server including the following attributes:
Type Value Mandatory Access
WsTaskbundleTaskType type Required rw
String name required,
length 1 to 255
rw
Integer rcs object id rw
String identifier Max. length 255 rw
String message text Max. length 255 rw
Boolean enforce rw
Sophos Mobile Control
20
5.27 WsTaskbundleTaskType
Represents the task bundle task types for task bundle tasks on the server including the following static attributes:
Type Value Access
TaskbundleTaskType MDMAgentInstall, SoftwareInstall, CommandBundleTransfer, WinMobileProfileTransfer, TextSms, Wipe, ResolveActiveSyncId, TriggerSmsecScan, AndroidProfileTransfer, IOSMDMBootstrap, IOSMDMProfileTransfer, IOSMDMProfileRemoval, IOSMDMProvisioningProfileTransfer, IOSMDMProvisioningProfileRemoval r
5.28 WsTransition
Represents transitions (“task”) for devices including the following attributes:
Type Value Mandatory Access
Integer id r
String package name r
WsDevice device r
Date scheduled date r
Date execution date r
Web service guide
21 21
5.29 WsVersionInfo
Information about the server version:
Type Value Mandatory Access
String core version r
String gui version r
Sophos Mobile Control
22
6 Available filters
6.1 WsAdminUserFilter
Allows filtering the admin user list with the following options:
Type Value Integer id
String login name
String last name
Integer from index
Integer page size
6.2 WsAndroidProfileFilter
Allows filtering the android profile list with the following options:
Type Value Integer id String name String version
WsOperatingSystem[] link to operating system
Integer from index
Integer page size
Web service guide
23 23
6.3 WsComplianceSetFilter
Allows filtering the compliance set list with the following options:
Type Value Integer id String name
Integer from index
Integer page size
6.4 WsCustomerFilter
Allows filtering the customer list with the following options:
Type Value Integer id
String external id
String name
Integer from index
Integer page size
6.5 WsDeletedDeviceFilter
Allows filtering the deleted devices list with the following options:
Type Value String name
Date deletion date, returns results with deletion
dates not older than given date
Sophos Mobile Control
24
6.6 WsDeviceFilter
Allows filtering the device list with the following options:
Type Value Integer id String name
String phone number
String email
WsOperatingSystem[] link to operating systems
boolean managed boolean compliant
Date updated date, returns results with update dates
not older than given date
Integer from index
Integer page size
6.7 WsDeviceGroupFilter
Allows filtering the device group list with the following options:
Type Value Integer id String name
Integer from index
Integer page size
Web service guide
25 25
6.8 WsDeviceTemplateFilter
Allows filtering the device template list with the following options:
Type Talue Integer id String name
WsOperatingSystem[] link to operating systems
Integer from index
Integer page size
6.9 WsInternalSSPUserFilter
Allows filtering the internal SSP user list with the following options:
Type Value
String common name
String email
String phone number
String user name
6.10 WsIOSProfileFilter
Allows filtering the iOS profile list with the following options:
Type Value Integer id String name String version
WsOperatingSystem[] link to operating systems
Integer from index
Sophos Mobile Control
26
6.11 WsOperatingSystemFilter
Allows filtering the operating system list with the following options:
Type Value Integer id String name
WsOperatingSystemPlatform link to platform
Integer from index
Integer page size
6.12 WsSoftwareFilter
Allows filtering the software list with the following options:
Type Value Integer id String name String version
WsOperatingSystem[] link to operating systems
Integer from index
Integer page size
6.13 WsTaskBundleFilter
Allows filtering the task bundle list with the following options:
Type Value Integer id String name String version
WsOperatingSystem[] link to operating systems
Integer from index
Web service guide
27 27
6.14 WsTransitionFilter
Allows filtering the transition list with the following options:
Type Value Integer id
WsDevice link to device
Integer from index
Sophos Mobile Control
28
7 Available operations
All operations except for getVersionInfo() require the web service client to be logged in.
Note: In the following operations, the acronym MTA may occur. MTA stands for Multi Tenant Admin and can be used as a synonym for super administrator.
7.1 cloneMtaSettingsAndAssignRcsMos(WsCustomer)
This operation clones settings from the super administrator customer to the given target customer. This is useful when setting up new customers. All settings are copied to the target customer. Device groups are also copied. All packages the super administrator has are assigned (as opposed to being copied) to the target customer.Parameters
WsCustomer: The customer to receive the cloned settings Return
WsCustomer: The modified customer (not yet saved) Throws
LoginRequiredException: If the web service client has no valid session
InsufficientRightsException: If the web service client has no rights to access this operation (especially in case the logged in user is not a super administrator user)
WebserviceException: Any other errors
7.2 createAdminUser(String, String, String, String)
This operation creates an admin user for the logged in customer. If a password is needed, it has to be set after creation and before saving of the admin user.
Parameters
String: user name String: last name String: first name String: email address Return
Web service guide
29 29 Throws
LoginRequiredException: If the web service client has no valid session
InsufficientRightsException: If the web service client has no rights to access this operation WebserviceException: Any other errors
7.3 createAndroidProfile()
The operation creates a template forAndroid profiles. This template needs to be edited and filled with information afterwards.
Parameters None Return
WsAndroidProfile: The created android profile (not yet saved) Throws
LoginRequiredException: If the web service client has no valid session
InsufficientRightsException: If the web service client has no rights to access this operation WebserviceException: Any other errors
7.4 createAndroidProfileTransition(WsDevice,
WsAndroidProfile, Date)
This operation creates a transition to send an Android profile to an Android device.
Parameters
WsDevice: Device for transition
WsAndroidProfile: Android profile for selected device Date: Scheduled start date
Return
Sophos Mobile Control
30 Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.5 createAndSaveCustomer(String, String, String, String,
String, String, String, String, String, String, boolean)
The operation creates and saves (!) a customer and an admin user for this customer.Parameters
String: customer name String: external id
String: technical contact last name String: technical contact first name String: technical contact email address String: admin user login name
String: admin user last name String: admin user first name String: admin user email address String: admin user password
boolean: Users have to change their predefined passwords. return
Integer: the id of the saved customer throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. (especially in case the logged in user is not a super administrator user)
Web service guide
31 31
7.6 createComplianceSet()
This operation creates an empty template for a compliance set which needs to be edited afterwards.
Parameters None Return
WsComplianceSet: The created compliance set (not yet saved) Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.7 createDeviceDecommissionTransition(WsDevice)
This operation creates a decommission transition for a device. The command for decommissioning will be sent to the selected device.
Parameters
WsDevice: Device to decommission Return
Integer: The ID of the created transition Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Sophos Mobile Control
32
7.8 createDeviceFromTemplate(WsDeviceTemplate)
This operation creates a device from a device template which needs to be edited afterwards.Parameters
WsDeviceTemplate: The device template to use Return
WsDevice: The created device (not yet saved) Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors.
7.9 createDeviceGroup()
This operation creates a device group for the logged in customer. Needs to be edited afterwards.
Parameters None Return
WsDeviceGroup: The created device group (not saved yet) Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Web service guide
33 33
7.10 createDeviceLocateTransition(WsDevice)
This operation creates a locate transition for a device. The command for locating the device will be sent to the selected device.
Parameters
WsDevice: device to locate Return
Integer: The ID of the created transition Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.11 createDeviceLockCodeTransition(WsDevice, String)
This operation creates a device lock with a new password transition for a device. The command to lock the device with a new password will be sent to the selected device.
Parameters
WsDevice: Device to lock with code String: Lock code to use
Return
Integer: The ID of the created transition Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Sophos Mobile Control
34
7.12 createDeviceLockTransition(WsDevice)
This operation creates a lock transition for a device. The command to lock the device will be sent to the selected device.
Parameters
WsDevice: The device to lock Return
Integer: The ID of the created transition Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.13 createDeviceSyncTransition(WsDevice)
This operation creates a sync transition for a device. The command to sync the device with the server will be sent to the selected device.
Parameters
WsDevice: device to sync Return
Integer: The ID of the created transition Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Web service guide
35 35
7.14 createDeviceUnlockTransition(WsDevice)
This operation creates an unlock transition for a device. The command for a device unlock will be sent to the selected device.
Parameters
WsDevice: Device to unlock Return
Integer: The ID of the created transition Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.15 createDeviceWipeTransition(WsDevice)
This operation creates a wipe transition for a device. The command for a device wipe will be sent to the selected device.
Parameters
WsDevice: The device to wipe Return
Integer: The ID of the created transition Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Sophos Mobile Control
36
7.16 createInternalSSPUser(String, String, String, String,
String)
The operation creates an internal SSP user for the logged in customer. The SSP user will get a generated password by email.
Parameters
String: user name String: last name String: first name String: email address String: phone number Return
The created internal SSP user (not yet saved) Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.17 createIOSProfile()
The operation creates a template for iOS profiles. This template needs to be edited and filled with information afterwards.
Parameters None Return
The created iOS profile (not yet saved) Throws
LoginRequiredException: If the web service client has no valid session.
Web service guide
37 37
7.18 createIOSProfileTransition(WsDevice, WsIOSProfile, Date)
This operation creates a transition to send an iOS profile to an iOS device.Parameters
WsDevice: Device for iOS profile transition Date: Scheduled start date
Return
The ID from the created transition Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.19 createSoftware()
This operation creates an empty template for a software package which needs to be edited afterwards. The entities for a software package differ by the type you choose. If you want a package with a link to an application, you only need to set the link in the entity. If you want to create a software package with an application file, you have to set the file content and file name in the entity (see chapter 5.24).
Parameters None Return
The created software package (not yet saved) Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Sophos Mobile Control
38
7.20 createSoftwareTransition(WsDevice, WsSoftware, Date)
This operation creates a software install transition for a device. The command to install a software package will be sent to the selected device.Parameters
WsDevice: Device for software transition
WsSoftware: Software package for selected device Date: Scheduled start date
Return
The ID of the created transition Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.21 createTaskBundle()
This operation creates an empty template for a task bundle which needs to be edited afterwards.
Parameters None Return
The created task bundle (not yet saved) Throws
LoginRequiredException: If the web service client has no valid session.
Web service guide
39 39
7.22 createTaskBundleTransition(WsDevice, WsTaskBundle,
Date)
This operation creates a task bundle transition for a device. The command to execute the task bundle will be sent to the selected device.
Parameters
WsDevice: The target device
WsTaskBundle: The task bundle to transfer Date: Scheduled start date
Return
Integer: the ID of the created transition Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation WebserviceException: Any other errors
7.23 getVersionInfo()
This operation returns the server information (core, GUI and web service version).
Parameters None Return
WsVersionInfo: Information of the server Throws
InsufficientRightsException: Does not apply in this case WebserviceException: Any other errors
Sophos Mobile Control
40
7.24 isTransitionFinal(WsTransition)
This operation returns true if the state of the selected transition is final.
Parameters
WsTransition: the transition to check Return
True, if the transition is in a final state, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.25 linkDeviceToUser(WsDevice, WsInternalSSPUser)
This operation links the selected device to the selected internal SSP user. The SSP user can operate this device from his SSP afterwards.
Parameters
WsDevice: Device to link with user WsInternalSSPUser: User for linking Return
True, if the link was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
ValueOutOfRangeException: Value of required field is out of range. WebserviceException: Any other errors
Web service guide
41 41
7.26 listAdminUsers(WsAdminUserFilter)
This operation returns an array of admin users matching the given filter. If no users are found, the operation returns null.
Parameters
WsAdminUserFilter: The admin user filter to use Return
WsAdminUser[]: Array of WsAdminUser matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.27 listAndroidProfiles(WsAndroidProfileFilter)
This operation returns an array of Android profiles matching the given filter. If no profiles are found, the operation returns null.
Parameters
WsAndroidProfileFilter: The Android profile filter to use Return
WsAndroidProfile[]: Array of WsAndroidPriles matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Sophos Mobile Control
42
7.28 listComplianceSets(WsComplianceSetFilter)
This operation returns an array of compliance sets matching the given filter. If no compliance sets are found, the operation returns null.
Parameters
WsComplianceSetFilter: The compliance set filter to use Return
WsComplianceSet[]: Array of WsComplianceSets matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.29 listComplianceViolations(WsDevice)
This operation returns an array of compliance violations matching the given filter. If no compliance violations are found, the operation returns null.
Parameters
WsDevice: The device for which to look up compliance violations Return
WsComplianceViolations[]: Array of WsComplianceViolations of the given device Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Web service guide
43 43
7.30 listCustomerProperties()
This operation returns a list of WsCustomerProperties for the logged in customer.
Parameters none Return
WsCustomerProperty[]: Array of WsCustomerProperties for the logged in WsCustomer Throws
InsufficientRightsException: If the web service client has no rights to access this operation. LoginRequiredException: If the web service client has no valid session.
WebserviceException: Any other errors
7.31 listCustomers(WsCustomerFilter)
This operation returns an array of customers matching the given filter. If no customers are found, the operation returns null.
Parameters
WsCustomerFilter: The customer filter to use Return
WsCustomer: Array of WsCustomers matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation (especially in case the logged in user is not a super administrator user)
WebserviceException: Any other errors
Sophos Mobile Control
44
7.32 listDeletedDevices(WsDeletedDeviceFilter)
This operation returns an array of deleted devices matching the given filter. If no deleted devices are found, the operation returns null.
Parameters
WsDeletedDeviceFilter: The deleted device filter to use Return
WsDeletedDevice[]: Array of WsDeletedDevices matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.33 listDeviceGroups(WsDeviceGroupFilter)
This operation returns an array of device groups matching the given filter. If no groups are found, the operation returns null.
Parameters
WsDeviceGroupFilter: The device group filter to use Return
WsDeviceGroup[]: Array of WsDeviceGroups matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
Web service guide
45 45
7.34 listDevices(WsDeviceFilter)
This operation returns an array of devices matching the given filter. If no devices are found, the operation returns null.
Parameters
WsDeviceFilter: The device filter to use Return
WsDevic[]: Array of WsDevices matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.35 listDeviceTemplates(WsDeviceTemplateFilter)
Parameters WsDeviceTemplateFilter: The device template filter to use Return
WsDeviceTemplates[]: Array of WsDeviceTemplates matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Sophos Mobile Control
46
7.36 listInstalledIOSProfiles(WsDevice)
This operation returns an array of installed iOS profiles matching the given filter. If no installed iOS profiles are found, the operation returns null.
Parameters
WsDevice: The device whose profiles shall be queried Return
WsInstalledIOSProfile[]: Array of WsInstalledIOSProfiles of the given device Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.37 listInstalledIOSProvisioningProfiles(WsDevice)
This operation returns an array of installed iOS provisioning profiles matching the given filter. If no installed iOS provisioning profiles are found, the operation returns null.
Parameters
WsDevice: The device whose provisioning profiles shall be queried Return
WsInstalledIOSProvisioningProfile[]: Array of WsInstalledIOSProvisioningProfiles of the given device
Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Web service guide
47 47
7.38 listInstalledSoftware(WsDevice)
This operation returns an array of installed software matching the given filter. If no software is found, the operation returns null.
Parameters
WsDevice: The device whose installed software shall be queried Return
WsInstalledSoftware[]: Array of WsInstalledSoftware[] of the given device Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.39 listInternalSSPUsers(WsInternalSSPUserFilter)
This operation returns an array of internal SSP users matching the given filter. If no users are found, the operation returns null.
Parameters
WsInternalSSPUserFilter: The internal SSP user filter to use Return
WsInternalSSPUser[]: Array of WsInternalSSPUsers mathing the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Sophos Mobile Control
48
7.40 listIOSProfiles(WsIOSProfileFilter)
This operation returns an array of iOS profiles matching the given filter. If no iOS profiles are found, the operation returns null.
Parameters
WsIOSProfileFilter: the iOS profile filter to use Return
WsIOSProfile[]: Array of WsIOSProfiles matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.41 listOperatingSystems(WsOperatingSystemFilter)
This operation returns an array of operating systems matching the given filter. If no operating systems are found, the operation returns null.
Parameters
WsOperatingSystemFilter: The operating system filter to use Return
WsOperatingSystem[]: Array of WsOperatingSystems matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Web service guide
49 49
7.42 listSoftware(WsSoftwareFilter, boolean)
This operation returns an array of software packages matching the given filter. If no software packages are found, the operation returns null.
Parameters
WsSoftwareFilter: The software filter to use Boolean: Include content of uploaded packages Return
WsSoftware[]: Array of WsSoftware matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.43 listTaskBundles(WsTaskBundleFilter)
This operation returns an array of task bundles matching the given filter. If no task bundles are found, the operation returns null.
Parameters
WsTaskBundleFilter: The task bundle filter to use Return
WsTaskbundle[]: Array of WsTaskBundles matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
Sophos Mobile Control
50
7.44 listTransitions(WsTransitionFilter)
This operation returns an array of transition matching the given filter. If no transitions are found, the operation returns null.
Parameters
WsTransitionFilter: The transition filter to use Return
WsTransition[]: Array of WsTransitions matching the given filter Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.45 login(String, String, String)
This operation fulfills the login for the user with the given credentials.
Parameters
String: The customer name String: The user name String: The password Return
Boolean: True, if the credentials are correct, false otherwise. Throws
WebserviceException: Any other errors
InsufficientRightsException: If the web service client has no rights to access this operation.
Web service guide
51 51
7.46 logout()
This operation logs out the logged in user.
Parameters None Return
Boolean: True Throws
WebserviceException: Any errors
7.47 removeAdminUser(WsAdminUser)
This operation removes the selected admin user. Returns true if successful.Parameters
WsAdminUser: Admin user to remove Return
Boolean: True if removing was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.48 removeAndroidProfile(WsAndroidProfile)
This operation removes the selected android profile. Returns true if successful.Parameters
WsAndroidProfile: Android profile to remove Return
Sophos Mobile Control
52 Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.49 removeComplianceSet(WsComplianceSet)
This operation removes the selected compliance set. Returns true if successful.Parameters
WsComplianceSet: Compliance set to remove Return
Boolean: True, if removing was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.50 removeCustomer(WsCustomer)
This operation removes the selected customer. This operation is only possible, if all devices of the customer are deleted before. Returns true if successful.
Parameters
WsCustomer: The customer to remove Return
Boolean: True, if removing was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation (especially in case the logged in user is not a super administrator user).
Web service guide
53 53
7.51 removeDevice(WsDevice)
This operation removes the selected device. Returns true if successful.
Parameters
WsDevice: The device to remove Return
Boolean: True, if removing was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.52 removeDeviceGroup(WsDeviceGroup)
This operation removes the selected device group. Returns true if successful.Parameters
WsDeviceGroup: The device group to remove Return
Boolean: True, if removing was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
Sophos Mobile Control
54
7.53 removeInternalSSPUser(WsInternalSSPUser)
This operation removes the selected internal SSP user. Returns true if successful.Parameters
WsInternalSSPUser: The internal SSP user to remove Return
Boolean: True, if removing was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.54 removeIOSProfile(WsIOSProfile)
This operation removes the selected iOS profile. Returns true if successful.
Parameters
WsIOSProfile: iOS profile to remove Return
Boolean: True, if removing was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
Web service guide
55 55
7.55 removeSoftware(WsSoftware)
This operation removes the selected software package. Returns true if successful.
Parameters
WsSoftware: Software to remove Return
Boolean: True, if removing was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.56 removeTaskBundle(WsTaskBundle)
This operation removes the selected task bundle. Returns true if successful.Parameters
WsTaskBundle: Task bundle to remove Return
Boolean: True, if removing was successful, false otherwise Throws
LoginRequiredException: If the web service client has no valid session.
Sophos Mobile Control
56
7.57 removeTransition(WsTransition)
This operation removes the selected transition. Returns true if successful.
Parameters
WsTransition: The transition to remove Return
Boolean: True, if removing was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
7.58 resetDeviceLoginData(WsDevice)
This operation resets the login data of the selected device. Returns true if successful.
Parameters
WsDevice: The device whose login data shall be reset. Return
Boolean: True, if reset login data was successful, false otherwise. Throws
LoginRequiredException: If the web service client has no valid session.
Web service guide
57 57
7.59 saveAdminUser(WsAdminUser)
This operation saves a previously created admin user and returns the ID of the saved admin user, if the operation was successful.
Parameters
WsAdminUser: Admin user to save Return
Integer: The admin user ID Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
ValueOutOfRangeException: Value of required field is out of range. WebserviceException: Any other errors
7.60 saveAndroidProfile(WsAndroidProfile)
This operation saves a previously created Android profile and returns the ID of the saved profile, if the operation was successful.
Parameters
WsAndroidProfile: Android profile to save Return
Integer: The Android profile ID Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. WebserviceException: Any other errors
Sophos Mobile Control
58
7.61 saveComplianceSet(WsComplianceSet)
This operation saves a previously created compliance set and returns the ID of the saved compliance set, if the operation was successful.
Parameters
WsComplianceSet: Compliance set to save Return
Integer: The compliance set ID Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
ValueOutOfRangeException: Value of required field is out of range. WebserviceException: Any other errors
7.62 saveCustomer(WsCustomer)
This operation saves a previously created customer and returns the ID of the saved customer, if the operation was successful.
Parameters
WsCustomer: The customer to save Return
Integer: The customer ID Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
Web service guide
59 59
7.63 saveDevice(WsDevice)
This operation saves a previously created device and returns the ID of the saved device if the operation was successful.
Parameters
WsDevice: the device to save Return
Integer: The device ID Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
ValueOutOfRangeException: Value of required field is out of range. WebserviceException: Any other errors
7.64 saveCustomerProperty(WsCustomerProperty)
This operation saves a WsCustomerProperty for the logged in customer. Not all WsCustomerProperties are supported to be modified by this method. The parameters that can be modified are listed.
Parameters
WsCustomerProperty: The customer property to save Return
Boolean: true, if successful, false if not. Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
Sophos Mobile Control 60 Supported properties email_href.subject email_href.content.anroid email_href.content.ios pwd.new.email.subject pwd.new.email.content pwd.reset.email.subject pwd.reset.email.content APPLE_PUSHSERVER_PKCS12_KEYSTORE APPLE_PUSHSERVER_PKCS12_KEYSTORE_PASSWORD compliance.adminmail.recipients compliance.adminmail.timetable ssp.agreementtext ssp.maxalloweddevices ssp.postinstallmessage
7.65 saveDeviceGroup(WsDeviceGroup)
This operation saves a previously created device group and returns the ID of the saved group, if the operation was successful.
Parameters
WsDeviceGroup: The device group to save Return
Integer: The device group ID Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
Web service guide
61 61
7.66 saveInternalSSPUser(WsInternalSSPUser)
This operation saves a previously created internal SSP user and returns the distinguished name (DN) of the saved internal SSP user, if the operation was successful.
Parameters
WsInternalSSPUser: Internal SSP user to save Return
String: The internal SSP user distinguished name (DN) Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
ValueOutOfRangeException: Value of required field is out of range. WebserviceException: Any other errors
7.67 saveIOSProfile(WsIOSProfile)
This operation saves a previously created iOS profile and returns the ID of the saved profile if the operation was successful.
Parameters
WsIOSProfile: iOS profile to save Return
Integer: The iOS profile ID Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
Sophos Mobile Control
62
7.68 saveSoftware(WsSoftware)
This operation saves a previously created software package and returns the ID of the saved software package, if the operation was successful.
Parameters
WsSoftware: The software to save Return
Integer: The software ID Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
ValueOutOfRangeException: Value of required field is out of range. WebserviceException: Any other errors
7.69 saveTaskBundle(WsTaskBundle)
This operation saves a previously created task bundle and returns the ID of the saved task bundle, if the operation was successful.
Parameters
WsTastBundle: The task bundle to save Return
Integer: the task bundle ID Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
Web service guide
63 63
7.70 setCustomerToInternalLdapConfig(WsCustomer)
This operation allows the creation of an internal LDAP entry for the customer on the server. The customer’s properties are modified to use the internal LDAP configuration. This operation should only be used when the customer currently has no LDAP configuration (internal or external). After configuring it, the customer may use the LDAP directory for managing internal SSP users.
Parameters
WsCustomer: The customer to configure internal LDAP Return
WsCustomer: The modified customer with internal LDAP (not yet saved) Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation (especially in case the logged in user is not a super administrator user).
WebserviceException: Any other errors
7.71 unlinkDeviceFromUser(WsDevice)
This operation removes the link of the selected device to an internal SSP user. Returns true, if successful.
Parameters
WsDevice: Device to unlink from user Return
Boolean: True if unlink was successful, false otherwise Throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
Sophos Mobile Control
64
7.72 updateInternalSSPUserPassword(WsInternalSSPUser,
String, boolean)
This operation adds/updates the password of the internal SSP user. Has the possibility to require password change after login.
Parameters
WsInternalSSPUSer: internal SSP user to update String: New password for internal SSP user
Boolean: True = user have to change password after login. Return
Boolean: True, if update password was successful, false otherwise. throws
LoginRequiredException: If the web service client has no valid session.
InsufficientRightsException: If the web service client has no rights to access this operation. MandatoryValueMissingException: One of the required fields is not set.
Web service guide
65 65
8 Appendix
Note: In the following examples, the acronym MTA may occur. MTA stands for Multi Tenant Admin and can be used as a synonym for super administrator.
8.1 Example: how to create, save and remove a device
The following snippet shows a simplified Java example on how to create, save and remove a device. Exception and error handling is not included for brevity.
/**
* Shows how to create a new device using a device template and * how to save and remove it.
*/
publicvoid createAndRemoveDevice() {
try
{
//try to login
if (!proxy.login(loginCustomer, loginUsername, loginPassword)) {
//wrong credentials, your error handling here return;
}
//create new device: get all Android device templates
WsOperatingSystemFilter osFilter = new WsOperatingSystemFilter(); osFilter.setPlatform(WsOperatingSystemPlatform.android);
WsOperatingSystem[] oss = proxy.listOperatingSystems(osFilter); WsDeviceTemplateFilter templateFilter = new WsDeviceTemplateFilter(); templateFilter.setOperatingSystems(oss);
WsDeviceTemplate[] templates = proxy.listDeviceTemplates(templateFilter);
//create new device: get all device groups
WsDeviceGroup[] groups = proxy.listDeviceGroups(new WsDeviceGroupFilter());
//create new device: create new device object from any template
WsDevice device = proxy.createDeviceFromTemplate(templates[0]);
//create new device: set mandatory device properties
device.setName("webservice test"); device.setDescription("description"); device.setPhoneNumber("+441701234567"); device.setEmailAddress("[email protected]"); device.setGroup(groups[0]);
//create new device: save device and keep device's id
Integer createdDeviceId = proxy.saveDevice(device);
//important: request device using the id
WsDeviceFilter deviceFilter = new WsDeviceFilter(); deviceFilter.setId(createdDeviceId);
//should be exactly one
Sophos Mobile Control
66
//clean up: remove device
proxy.removeDevice(device); //logout proxy.logout(); } catch (Exception e) {
//your exception handling here
e.printStackTrace(); }