Get a peripheral¶
GET/
Endpoint API · Peripheral Control
Get a peripheral by ID.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
peripheralId | path | string (uuid) | Yes | Peripheral ID. |
Request samples¶
curl -X GET "https://api-<data-region>.central.sophos.com/endpoint/v1/settings/peripheral-control/peripherals/<peripheralId>" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"
import requests
response = requests.get(
"https://api-<data-region>.central.sophos.com/endpoint/v1/settings/peripheral-control/peripherals/<peripheralId>",
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/endpoint/v1/settings/peripheral-control/peripherals/<peripheralId>" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api-<data-region>.central.sophos.com/endpoint/v1/settings/peripheral-control/peripherals/<peripheralId>", 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/endpoint/v1/settings/peripheral-control/peripherals/<peripheralId>", {
method: "GET",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
200 — Peripheral.¶
Response fields
idstring (uuid)requiredUniversally unique peripheral ID assigned by Sophos Central.
typestringrequiredPeripheral type.
Must be one of:
Must be one of:
opticalDrive, floppyDrive, modem, encryptedStorage, infrared, wireless, removableStorage, bluetooth, mtp, camera.categorystringrequiredPeripheral category.
Must be one of:
Must be one of:
storage, network, media.modelstringrequiredPeripheral model as reported by the associated endpoint.
Must be at most 250 characters long.
Must be at most 250 characters long.
modelIdstringrequiredPeripheral model ID as reported by the associated endpoint.
Must be at most 250 characters long.
Must be at most 250 characters long.
instanceIdstringPeripheral instance ID as reported by the associated endpoint.
Must be at most 250 characters long.
Must be at most 250 characters long.
lastEndpointobjectReference to an endpoint.
Show child attributesHide child attributes
idstring (uuid)requiredUnique endpoint ID.
hostnamestringEndpoint hostname.
lastUsedBystringName or login of last known user of this peripheral, if available.
Must be at most 100 characters long.
Must be at most 100 characters long.
lastActionTakenstringPeripheral control action.
Must be one of:
Must be one of:
alertedOnly, readOnly, blocked.firstSeenAtstring (date-time)When this peripheral was first detected.
lastSeenAtstring (date-time)When this peripheral was last detected.
Errors¶
| Status | Meaning |
|---|---|
404 | Can't find peripheral. |
500 | Unexpected error. |
All error responses share the same shape — see the error response object.
Response examples¶
200¶
{
"id": "eb6c74a0-8bc2-4b88-9030-b547db0f2832",
"type": "wireless",
"category": "network",
"model": "Apple Wireless Network Adapter (802.11 a\u2215b\u2215g\u2215n\u2215ac)",
"modelId": "5AC-AIRPORT-19910ED94C48",
"instanceId": "INS:5AC-AIRPORT-19910ED94C48",
"lastEndpointHostname": "John's iMac",
"lastUsedBy": "John's iMac\\johndoe",
"lastActionTaken": "allowed",
"firstSeenAt": "2020-10-29T11:03:57.000Z",
"lastSeenAt": "2021-01-17T16:00:06.000Z"
}
See the guide for a narrative walkthrough of this API.