Skip to content

Get mobile OS by ID

GET/operating-systems/{id}

Mobile API · Operating Systems

Get mobile operating system by ID.

Required permissionmobile.os:read

Parameters

Name In Type Required Description
id path string (uuid) Yes Unique object identifier.
view query string No Type of view to be returned in response.
Must be one of: basic, summary, full.
X-Tenant-ID header string (uuid) Yes Tenant ID.
fields query array of string No The fields to return in a partial response.

Request samples

curl -X GET "https://api-<data-region>.central.sophos.com/mobile/v1/operating-systems/<id>" -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/<id>",
    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/<id>" -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/<id>", 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/<id>", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Tenant-ID": "<tenant-id>",
  },
});
const data = await response.json();
console.log(data);

Responses

200 — Mobile operating system.

Response fields

idstring (uuid)required
ID of the operating system.
versionstringrequired
The operating system version.
namestringrequired
The name of the operating system.
platformstring (enum)required
The device platform, i.e. the operating system.
Must be one of: iOS, macOS, android, chrome, windows.
majorVersionstring
OS major version.
minorVersionstring
OS minor version.
patchVersionstring
OS patch version.

Errors

Status Meaning
401 Unauthorized.
403 Forbidden.
404 Unknown operating system.
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

{
  "id": "c9c9b03c-5cf7-4fe1-93bb-246afc9044d2",
  "version": "12.0.1",
  "name": "iOS 12.0.1",
  "platform": "ios",
  "majorVersion": 12,
  "minorVersion": 0,
  "patchVersion": 1
}

See the guide for a narrative walkthrough of this API.