Skip to content

Manage device software

PATCH/settings/device-software

Endpoint API · Device Software

Update assigned endpoint device software in bulk.

Required permissionendpoint-server:update OR endpoint-computer:update

Parameters

Name In Type Required Description
X-Tenant-ID header string (uuid) Yes Tenant ID.

Request body

Content type: application/json

Request body fields

computerobject
Request to change assigned device software for the endpoint.
Show child attributesHide child attributes
protectionAssignedIdstring
Protection device software.
encryptionAssignedIdstring
Encryption device software.
ztnaAssignedIdstring
ZTNA device software.
idsarray of string (uuid)required
IDs for the endpoints getting device software updated.
Must contain 1–1000 items.
serverobject
Request to change assigned device software for the endpoint.
Show child attributesHide child attributes
protectionAssignedIdstring
Protection device software.
encryptionAssignedIdstring
Encryption device software.
ztnaAssignedIdstring
ZTNA device software.
idsarray of string (uuid)required
IDs for the endpoints getting device software updated.
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)required
List of endpoint IDs whose assigned device software was updated.
errorsarray of object
Errors processing the request.
Error processing the request.
Show child attributesHide child attributes
idstring (uuid)required
Endpoint ID.
codestringrequired
Error code.

Errors

Status Meaning
403 Authorization required.
500 Internal server error.

All error responses share the same shape — see the error response object.

Response examples

200

{
  "updated": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "errors": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "code": "string"
    }
  ]
}

See the guide for a narrative walkthrough of this API.