Manage device software¶
PATCH/
Endpoint API · Device Software
Update assigned endpoint device software in bulk.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
Request body¶
Content type: application/json
Request body fields
computerobjectRequest to change assigned device software for the endpoint.
Show child attributesHide child attributes
protectionAssignedIdstringProtection device software.
encryptionAssignedIdstringEncryption device software.
ztnaAssignedIdstringZTNA device software.
idsarray of string (uuid)requiredIDs for the endpoints getting device software updated.
Must contain 1–1000 items.
Must contain 1–1000 items.
serverobjectRequest to change assigned device software for the endpoint.
Show child attributesHide child attributes
protectionAssignedIdstringProtection device software.
encryptionAssignedIdstringEncryption device software.
ztnaAssignedIdstringZTNA device software.
idsarray of string (uuid)requiredIDs for the endpoints getting device software updated.
Must contain 1–1000 items.
Must contain 1–1000 items.
Request samples¶
curl -X PATCH "https://api-<data-region>.central.sophos.com/endpoint/v1/settings/device-software" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>" -H "Content-Type: application/json" -d "{
\"computer\": {
\"protectionAssignedId\": \"MDR\",
\"encryptionAssignedId\": \"All\",
\"ztnaAssignedId\": \"None\",
\"ids\": [
\"00000000-0000-0000-0000-000000000000\"
]
},
\"server\": {
\"protectionAssignedId\": \"MDR\",
\"encryptionAssignedId\": \"All\",
\"ztnaAssignedId\": \"None\",
\"ids\": [
\"00000000-0000-0000-0000-000000000000\"
]
}
}"
import requests
response = requests.patch(
"https://api-<data-region>.central.sophos.com/endpoint/v1/settings/device-software",
headers={
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
"Content-Type": "application/json",
},
json={ 'computer': { 'protectionAssignedId': 'MDR',
'encryptionAssignedId': 'All',
'ztnaAssignedId': 'None',
'ids': ['00000000-0000-0000-0000-000000000000']},
'server': { 'protectionAssignedId': 'MDR',
'encryptionAssignedId': 'All',
'ztnaAssignedId': 'None',
'ids': ['00000000-0000-0000-0000-000000000000']}},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Tenant-ID" = "<tenant-id>"
"Content-Type" = "application/json"
}
$body = '{
"computer": {
"protectionAssignedId": "MDR",
"encryptionAssignedId": "All",
"ztnaAssignedId": "None",
"ids": [
"00000000-0000-0000-0000-000000000000"
]
},
"server": {
"protectionAssignedId": "MDR",
"encryptionAssignedId": "All",
"ztnaAssignedId": "None",
"ids": [
"00000000-0000-0000-0000-000000000000"
]
}
}'
Invoke-RestMethod -Method PATCH -Uri "https://api-<data-region>.central.sophos.com/endpoint/v1/settings/device-software" -Headers $headers -Body $body -ContentType "application/json"
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, err := http.NewRequest("PATCH", "https://api-<data-region>.central.sophos.com/endpoint/v1/settings/device-software", strings.NewReader(`{
"computer": {
"protectionAssignedId": "MDR",
"encryptionAssignedId": "All",
"ztnaAssignedId": "None",
"ids": [
"00000000-0000-0000-0000-000000000000"
]
},
"server": {
"protectionAssignedId": "MDR",
"encryptionAssignedId": "All",
"ztnaAssignedId": "None",
"ids": [
"00000000-0000-0000-0000-000000000000"
]
}
}`))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <access-token>")
req.Header.Set("X-Tenant-ID", "<tenant-id>")
req.Header.Set("Content-Type", "application/json")
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/device-software", {
method: "PATCH",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"computer": {
"protectionAssignedId": "MDR",
"encryptionAssignedId": "All",
"ztnaAssignedId": "None",
"ids": [
"00000000-0000-0000-0000-000000000000"
]
},
"server": {
"protectionAssignedId": "MDR",
"encryptionAssignedId": "All",
"ztnaAssignedId": "None",
"ids": [
"00000000-0000-0000-0000-000000000000"
]
}
}),
});
const data = await response.json();
console.log(data);
Responses¶
200 — Success.¶
Response fields
updatedarray of string (uuid)requiredList of endpoint IDs whose assigned device software was updated.
errorsarray of objectErrors processing the request.
Error processing the request.
Show child attributesHide child attributes
idstring (uuid)requiredEndpoint ID.
codestringrequiredError code.
Errors¶
| Status | Meaning |
|---|---|
403 | Authorization required. |
500 | Internal server error. |
All error responses share the same shape — see the error response object.
See the guide for a narrative walkthrough of this API.