List mobile OSs¶
GET/
Mobile API · Operating Systems
Get list of mobile operating systems.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
fields | query | array of string | No | The fields to return in a partial response. |
ids | query | array of string (uuid) | No | List of IDs. |
sort | query | array of string | No | Defines how to sort the data. Each item must match the pattern (^[^:]+$)|(^[^:]+:(asc|desc)$). |
page | query | integer | No | The page number to fetch, starting with 1. |
pageSize | query | integer | No | The size of the page requested. |
pageTotal | query | boolean | No | Whether the number of pages should be calculated and returned in the response. |
view | query | string | No | Type of view to be returned in response. Must be one of: basic, summary, full. |
platform | query | array of string (enum) | No | Filter objects by platform. Each item must be one of: iOS, macOS, android, chrome, windows. |
version | query | array of string | No | Filter operating system objects by version (startsWith). Must contain at most 10 items. Each item must be at most 20 characters long. |
Request samples¶
curl -X GET "https://api-<data-region>.central.sophos.com/mobile/v1/operating-systems" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"
import requests
response = requests.get(
"https://api-<data-region>.central.sophos.com/mobile/v1/operating-systems",
headers={
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Tenant-ID" = "<tenant-id>"
}
Invoke-RestMethod -Method GET -Uri "https://api-<data-region>.central.sophos.com/mobile/v1/operating-systems" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api-<data-region>.central.sophos.com/mobile/v1/operating-systems", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <access-token>")
req.Header.Set("X-Tenant-ID", "<tenant-id>")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
const response = await fetch("https://api-<data-region>.central.sophos.com/mobile/v1/operating-systems", {
method: "GET",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
200 — List of mobile operating systems.¶
Response fields
itemsarray of objectrequiredList of operating systems.
Mobile operating system object.
Show child attributesHide child attributes
idstring (uuid)requiredID of the operating system.
versionstringrequiredThe operating system version.
namestringrequiredThe name of the operating system.
platformstring (enum)requiredThe device platform, i.e. the operating system.
Must be one of:
Must be one of:
iOS, macOS, android, chrome, windows.majorVersionstringOS major version.
minorVersionstringOS minor version.
patchVersionstringOS patch version.
pagesobjectrequiredShow child attributesHide child attributes
currentintegerrequiredThe 1-based page number being returned.
sizeintegerrequiredThe size of the page being returned.
totalinteger(Optional) The total number of pages that exist, if pageTotal=true in the request.
itemsinteger(Optional) The total number of items across all pages.
maxSizeintegerrequiredThe maximum page size that can be requested.
Errors¶
| Status | Meaning |
|---|---|
400 | Invalid request. |
401 | Unauthorized. |
403 | Forbidden. |
429 | Too many requests. See Retry-After header. |
500 | Internal server error. |
All error responses share the same shape — see the error response object.
Response examples¶
200¶
{
"items": [
{
"id": "c9c9b03c-5cf7-4fe1-93bb-246afc9044d2",
"version": "---",
"name": "iOS",
"platform": "ios"
},
{
"id": "ed19d8c2-b207-44c9-8233-6a4c07aeb4a0",
"version": 12,
"majorVersion": 12,
"minorVersion": 0,
"name": "Android 12.0",
"platform": "android"
},
{
"id": "b2a29d71-b159-421c-b567-dbfbf0dafeec",
"version": "R",
"name": "Android R",
"platform": "android"
},
{
"id": "4d37de2f-bc4a-4102-9b85-97eac29f41ee",
"version": "7.1.2",
"majorVersion": 7,
"minorVersion": 1,
"patchVersion": 2,
"name": "Android 7.1.2",
"platform": "android"
},
{
"id": "9852df33-21a7-4173-9f00-976187908658",
"version": 121,
"majorVersion": 121,
"name": "Chrome 121",
"platform": "chrome"
}
],
"pages": {
"current": 1,
"size": 50,
"maxSize": 500
}
}
See the guide for a narrative walkthrough of this API.