API description. Sophos Mobile, App groups interface
Sophos Mobile, your newly acquired device, empowers you with a wide range of capabilities to secure and manage your mobile devices effectively. With Sophos Mobile, you can:
-
Protect your devices from malware and threats: Sophos Mobile provides robust protection against malware, viruses, and other threats, ensuring the security of your sensitive data.
-
Manage apps and distribute them securely: Easily distribute apps to your devices and control which apps are allowed or forbidden, enhancing security and productivity.
-
Enforce security policies and configurations: Configure and enforce security policies, such as password requirements, encryption settings, and remote wipe capabilities, to safeguard your corporate data.
விளம்பரம்
விளம்பரம்
Sophos Mobile
4 API description
4.1 Log in
Log in to the Sophos Mobile server.
The /rs/login resource returns a session authentication token that is required to access the other web service resources. This token expires after 60 seconds of inactivity.
URL https://<smc_server_address>/rs/login
Method
POST
Request header
Key
Content-Type
Value application/x-www-form-urlencoded
Request body
Form data, containing these properties:
Key customer user password
Description
A customer name.
An administrator log-in name for that customer.
The administrator password.
Response body
JSON object with the following structure:
Key userName authToken loginDate rights
Type
String
String
Integer
Array of strings
Description
Administrator log-in name.
Session authentication token.
Log-in timestamp in epoch milliseconds.
List of rights that are granted to the administrator.
Copyright © 2018 Sophos Limited 5
6
Sophos Mobile
The administrator must have the following rights to be able to manage app groups:
• APP_GROUPS_BROWSE
• APP_GROUPS_CREATE
• APP_GROUPS_SHOW
• APP_GROUPS_UPDATE
HTTP response status
Status code
200 OK
401 Unauthorized
Description
Administrator was successfully logged in.
Administrator is not authorized to access the resource.
Example request
POST /rs/login HTTP/1.1
Host: smc.example.com
Content-Type: application/x-www-form-urlencoded customer=myCustomer&user=myAdminName&password=myPassword
Example response
{
"userName": "myAdminName",
"authToken": "da81d6d2-3c02-4f18-8115-f4188d84e851",
"loginDate": 1452258438634,
"rights": [
<array of granted rights>
]
}
4.2 Log out
Log out from the Sophos Mobile server.
URL https://<smc_server_address>/rs/logout
Method
POST
Copyright © 2018 Sophos Limited
Sophos Mobile
Request header
Key
X-SMCRS-Auth-Session
Value
Session authentication token from the login response.
Request body empty
Response body empty
HTTP response status
Status code
200 OK
401 Unauthorized
Description
Administrator was successfully logged out.
Administrator is not authorized or the authentication token has expired.
Example request
POST /rs/logout HTTP/1.1
Host: smc.example.com
X-SMCRS-Auth-Session: da81d6d2-3c02-4f18-8115-f4188d84e851
4.3 Create app group
Create an app group object.
URL https://<smc_server_address>/rs/androidappgroup https://<smc_server_address>/rs/iosappgroup https://<smc_server_address>/rs/macosappgroup https://<smc_server_address>/rs/windowsdesktopappgroup https://<smc_server_address>/rs/windowsphoneappgroup
Copyright © 2018 Sophos Limited 7
Sophos Mobile
8
Method
POST
Request header
Key
X-SMCRS-Auth-Session
Content-Type
Value
The session authentication token from the login response.
application/json
Request body
JSON object with the following structure:
Key name
Type
String appList Array of app objects
App objects have the following structure:
Key name identifier
Type
String
String fileUrl String (optional)
Description
External name of the app group.
App groups for the same platform (Android, iOS,
Windows Mobile) must have unique names. But it is for example possible to create an Android app group with the same name as an iOS app group.
See the following table.
Description
An arbitrary name that is used to identify the app.
For Android apps, this is the package name.
For iOS apps, this is the bundle ID.
For Windows Mobile apps, this is the GUID.
The URL of the app in Google Play, in the App
Store, or in the Windows Store.
Response body
JSON object with the properties of the app group that was created:
Key appGroupId name editable updateDate
Type
Number
String
Boolean
Integer
Description
ID of the app group.
External name of the app group.
If false, app group cannot be updated.
Update timestamp in epoch milliseconds.
Copyright © 2018 Sophos Limited
Key insertDate updatedBy insertedBy appList
Type
Integer
String
String
Array of app objects
Sophos Mobile
Description
Insertion timestamp in epoch milliseconds.
Name of the user that updated the app group.
Name of the user that created the app group.
Same structure as for request.
HTTP response status
Status code
204 OK
401 Unauthorized
403 Forbidden
409 Conflict
Description
App group was successfully created.
User is not authorized or the authentication token has expired.
User does not have sufficient rights.
Another app group for the same platform (Android, iOS, Windows
Mobile) with the specified name already exists.
Example request
POST /rs/androidappgroup HTTP/1.1
Host: smc.example.com
X-SMCRS-Auth-Session: da81d6d2-3c02-4f18-8115-f4188d84e851
Content-Type: application/json
{
"name": "myNewAppGroup",
"appList": [
{
"name": "Sophos Mobile Security",
"identifier": "com.sophos.smsec",
"fileUrl":
"https://play.google.com/store/apps/details?id=com.sophos.smsec"
}
]
}
Copyright © 2018 Sophos Limited 9
Sophos Mobile
Example response
{
"appGroupId": 10042,
"name": "myNewAppGroup",
"editable": true,
"updateDate": null,
"insertDate": 1467116868245,
"updatedBy": null,
"insertedBy": "myAdminName",
"appList": [
{
"name": "Sophos Mobile Security",
"identifier": "com.sophos.smsec",
"fileUrl":
"https://play.google.com/store/apps/details?id=com.sophos.smsec"
}
]
}
4.4 Get app groups
Get a list of all app group objects.
URL https://<smc_server_address>/rs/androidappgroup https://<smc_server_address>/rs/iosappgroup https://<smc_server_address>/rs/macosappgroup https://<smc_server_address>/rs/windowsdesktopappgroup https://<smc_server_address>/rs/windowsphoneappgroup
Method
GET
Request header
Key
X-SMCRS-Auth-Session
Value
The session authentication token from the login response.
10 Copyright © 2018 Sophos Limited
Sophos Mobile
Response body
JSON object with the list of Android app groups:
Key appGroupId name editable
Type
Number
String
Boolean
Description
ID of the app group.
External name of the app group.
If false, app group cannot be updated.
HTTP response status
Status code
200 OK
401 Unauthorized
403 Forbidden
Description
Request was successfully processed.
User is not authorized or the authentication token has expired.
User does not have sufficient rights.
Example request
GET /rs/androidappgroup HTTP/1.1
Host: smc.example.com
X-SMCRS-Auth-Session: da81d6d2-3c02-4f18-8115-f4188d84e851
Example response
[
{
"appGroupId": 10030,
"name": "myFirstAppGroup",
"editable": true
},
{
"appGroupId": 10031,
"name": "mySecondAppGroup",
"editable": false
},
{
"appGroupId": 10042,
"name": "myNewAppGroup",
"editable": true
}
]
Copyright © 2018 Sophos Limited 11
Sophos Mobile
12
4.5 Get app group by ID
Get the properties of an existing app group object.
URL https://<smc_server_address>/rs/androidappgroup/:id https://<smc_server_address>/rs/iosappgroup/:id https://<smc_server_address>/rs/macosappgroup/:id https://<smc_server_address>/rs/windowsdesktopappgroup/:id https://<smc_server_address>/rs/windowsphoneappgroup/:id
Method
GET
URL parameter
Parameter
:id
Description
The internal identifier of the app group.
This is the appGroupId attribute as returned by, for example GET /rs/ androidappgroup .
Request header
Key
X-SMCRS-Auth-
Session
Value
The session authentication token from the login response.
Response body
JSON object with the properties of the specified app group:
Key appGroupId name editable updateDate insertDate
Type
Number
String
Boolean
Integer
Integer
Description
ID of the app group.
External name of the app group.
If false, app group cannot be updated.
Update timestamp in epoch milliseconds.
Insertion timestamp in epoch milliseconds.
Copyright © 2018 Sophos Limited
Description
Name of the user that updated the app group.
Name of the user that created the app group.
See the following table.
Sophos Mobile
Key updatedBy insertedBy appList
Type
String
String
Array of app objects
App objects have the following structure:
Key name identifier
Type
String
String fileUrl String (optional)
Description
An arbitrary name that is used to identify the app.
For Android apps, this is the package name.
For iOS apps, this is the bundle ID.
For Windows Mobile apps, this is the GUID.
If set, the URL of the app in Google Play, in the
App Store, or in Microsoft Store.
HTTP response status
Status code
200 OK
401 Unauthorized
403 Forbidden
404 Not Found
Description
Request was successfully processed.
User is not authorized or the authentication token has expired.
User does not have sufficient rights.
App group with specified identifier does not exist.
Example request
GET /rs/androidappgroup/10042 HTTP/1.1
Host: smc.example.com
X-SMCRS-Auth-Session: da81d6d2-3c02-4f18-8115-f4188d84e851
Copyright © 2018 Sophos Limited 13
Sophos Mobile
Example response
{
"appGroupId": 10042,
"name": "myNewAppGroup",
"editable": true,
"updateDate": null,
"insertDate": 1467116868245,
"updatedBy": null,
"insertedBy": "myAdminName",
"appList": [
{
"name": "Sophos Mobile Security",
"identifier": "com.sophos.smsec",
"fileUrl":
"https://play.google.com/store/apps/details?id=com.sophos.smsec"
}
]
}
4.6 Update app group
Update an existing app group object.
URL https://<smc_server_address>/rs/androidappgroup/:id https://<smc_server_address>/rs/iosappgroup/:id https://<smc_server_address>/rs/macosappgroup/:id https://<smc_server_address>/rs/windowsdesktopappgroup/:id https://<smc_server_address>/rs/windowsphoneappgroup/:id
Method
PUT
Request header
Key
X-SMCRS-Auth-Session
Content-Type
Value
The session authentication token from the login response.
application/json
14 Copyright © 2018 Sophos Limited
Sophos Mobile
Request body
JSON object with the updated data of the app group:
Key name appList
Type
String
Array of app objects
Description
External name of the app group.
See the following table.
App objects have the following structure:
Key name identifier
Type
String
String fileUrl String (optional)
Description
An arbitrary name that is used to identify the app.
For Android apps, this is the package name.
For iOS apps, this is the bundle ID.
For Windows Mobile apps, this is the GUID.
The URL of the app in Google Play, in the App
Store, or in Microsoft Store.
Response body empty
HTTP response status
Status code
204 No Content
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
Description
App group was successfully updated.
User is not authorized or the authentication token has expired.
User does not have sufficient rights.
App group with specified identifier does not exist.
Another app group for the same platform (Android, iOS, Windows
Mobile) with the specified name already exists.
Copyright © 2018 Sophos Limited 15
Sophos Mobile
Example request
PUT /rs/androidappgroup/10042 HTTP/1.1
Host: smc.example.com
X-SMCRS-Auth-Session: da81d6d2-3c02-4f18-8115-f4188d84e851
Content-Type: application/json
{
"name": "myUpdatedAppGroup",
"appList":[
{
"name": "Sophos Mobile Security",
"identifier": "com.sophos.smsec",
"fileUrl":
"https://play.google.com/store/apps/details?id=com.sophos.smsec"
},
{
"name": "Sophos Mobile Control",
"identifier": "com.sophos.mobilecontrol.client.android",
"fileUrl":
"https://play.google.com/store/apps/details?
id=com.sophos.mobilecontrol.client.android"
}
]
}
16 Copyright © 2018 Sophos Limited
பதிவிறக்கு
விளம்பரம்