API description. Sophos Mobile, Network Access Control interface
Sophos Mobile, your newly acquired mobile security solution, empowers you with robust protection for your organization's mobile devices. It safeguards your data with advanced threat defense, including malware protection, web filtering, and app control. Additionally, it enables you to enforce security policies, remotely manage devices, and track their locations. With Sophos Mobile, you can confidently embrace the mobile revolution while ensuring the security of your corporate data.
விளம்பரம்
விளம்பரம்
Sophos Mobile
6
6 API description
6.1 Login (
rs/login
)
Login to the Sophos Mobile server.
The login resource returns a session authentication token that is required to access the other web service resources.
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
Customer name
Administrator login name
Administrator password
Response body
JSON object with the following structure:
Key userName authToken loginDate rights
Type
String
String
Integer
Array of strings
Description
Administrator login name
Session authentication token
Login timestamp in epoch milliseconds
List of rights that are granted to the administrator
Copyright © 2018 Sophos Limited
Sophos Mobile
The administrator must have the DEVICE_BROWSE right to be able to retrieve network access status.
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.yourcompany.com
Content-Type: application/x-www-form-urlencoded customer=your_customer&user=your_admin_name&password=your_password
Example response
{
"userName": "your_admin_name",
"authToken": "da81d6d2-3c02-4f18-8115-f4188d84e851",
"loginDate": 1452258438634,
"rights": [
<array of granted rights>
]
}
6.2 Logout (
rs/logout
)
Log out from the Sophos Mobile server.
URL https://<smc_server_address>/rs/logout
Method
POST
Request header
Key
X-SMCRS-Auth-Session
Value
Session authentication token from the login response
Copyright © 2018 Sophos Limited 7
8
Sophos Mobile
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.yourcompany.com
X-SMCRS-Auth-Session: da81d6d2-3c02-4f18-8115-f4188d84e851
6.3 Devices (
rs/nac/mac
)
This resource returns the MAC addresses of all devices for the customer, divided into devices with network access status Allowed and Denied.
URL https://<smc_server_address>/rs/nac/mac
Method
GET
Request header
Key
X-SMCRS-Auth-Session
Value
Session authentication token from the login response
Copyright © 2018 Sophos Limited
Sophos Mobile
Request body empty
Response body
JSON object with the following structure:
Key allowed denied
Type Description
Array of device objects List of devices with network access status Allow
Array of device objects List of devices with network access status Deny
Device objects have the following structure:
Key deviceId mac deniedReason
Type
Integer
String
String
Description
Internal device identifier
MAC address of the device
Possible values: null : Network access is allowed.
denied by compliance violation :
Network access is denied because of a compliance violation.
denied by admin : Network access is unconditionally denied in device settings.
HTTP response status
Status code
200 OK
401 Unauthorized
403 Forbidden
Description
Request was successfully processed
Administrator is not authorized or the authentication token has expired
Administrator does not have sufficient rights
Example request
POST /rs/nac/mac HTTP/1.1
Host: smc.yourcompany.com
X-SMCRS-Auth-Session: da81d6d2-3c02-4f18-8115-f4188d84e851
Copyright © 2018 Sophos Limited 9
Sophos Mobile
Example response
{
"allowed": [
{
"deviceId": 12060,
"mac": "021111111111",
"deniedReason": null
},
{
"deviceId": 12066,
"mac": "022222222222",
"deniedReason": null
}
],
"denied": [
{
"deviceId": 12069,
"mac": "023333333333",
"deniedReason": "denied by admin"
},
{
"deviceId": 22079,
"mac": "024444444444",
"deniedReason": "denied by compliance violation"
}
]
}
6.4 Users with denied devices (
rs/nac/ denieduser
)
This resource returns a list of device users that are assigned one or more devices with network access status Deny.
Only users from an external LDAP directory are listed.
URL https://<smc_server_address>/rs/nac/denieduser
Method
GET
10 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
JSON array containing objects with the following structure:
Key userIdentifier deniedDevices
Type
String
Description
User name
Array of device objects List of devices with network access status Deny
Device objects have the following structure:
Key deviceId deniedReason
Type
Integer
String
Description
Internal device identifier
Possible values: denied by compliance violation :
Network access is denied because of a compliance violation.
denied by admin : Network access is unconditionally denied in device settings.
Note
For customers with internal user management, the service responds with an empty JSON array
[] .
HTTP response status
Status code
200 OK
401 Unauthorized
403 Forbidden
Description
Request was successfully processed
Administrator is not authorized or the authentication token has expired
Administrator does not have sufficient rights
Copyright © 2018 Sophos Limited 11
Sophos Mobile
Example request
POST /rs/nac/denieduser HTTP/1.1
Host: smc.yourcompany.com
X-SMCRS-Auth-Session: da81d6d2-3c02-4f18-8115-f4188d84e851
Example response
[
{
"userIdentifier": "a user name",
"deniedDevices": [
{
"deviceId": 12069,
"mac": "023333333333",
"deniedReason": "denied by admin"
},
{
"deviceId": 22079,
"mac": "024444444444",
"deniedReason": "denied by compliance violation"
}
]
}
]
12 Copyright © 2018 Sophos Limited
பதிவிறக்கு
விளம்பரம்