Skip to content

Update websites

PATCH/settings/web-control/tls-decryption/excluded-websites

Endpoint API · Web Control

Add and remove websites excluded from SSL/TLS decryption.

Required permissionendpoint-state: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

addarray of object
Website to add to the exclusion list.
Must contain at most 500 items.
A website IP, range of IPs or domain to be excluded from SSL/TLS decryption of HTTPS websites.
Show child attributesHide child attributes
valuestringrequired
Website IP address, IP address range or domain.
Must match the pattern ^[-:0-9a-z./]{3,2048}$.
commentstring
Comment indicating why the site was excluded.
Must match the pattern ^[-\p{L}\p{Nl}\d ,.']{0,300}$.
removearray of object
Website to remove from the exclusion list.
Must contain at most 500 items.
A website IP, range of IPs or domain to be excluded from SSL/TLS decryption of HTTPS websites.
Show child attributesHide child attributes
valuestringrequired
Website IP address, IP address range or domain.
Must match the pattern ^[-:0-9a-z./]{3,2048}$.
commentstring
Comment indicating why the site was excluded.
Must match the pattern ^[-\p{L}\p{Nl}\d ,.']{0,300}$.

Request samples

curl -X PATCH "https://api-<data-region>.central.sophos.com/endpoint/v1/settings/web-control/tls-decryption/excluded-websites" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>" -H "Content-Type: application/json" -d "{
  \"add\": [
    {
      \"value\": \"10.50.100.100\",
      \"comment\": \"Site had suspicious behaviour\"
    }
  ],
  \"remove\": [
    {
      \"value\": \"10.50.100.100\",
      \"comment\": \"Site is safe now\"
    }
  ]
}"

import requests

response = requests.patch(
    "https://api-<data-region>.central.sophos.com/endpoint/v1/settings/web-control/tls-decryption/excluded-websites",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Tenant-ID": "<tenant-id>",
        "Content-Type": "application/json",
    },
    json={   'add': [   {   'value': '10.50.100.100',
                   'comment': 'Site had suspicious behaviour'}],
    'remove': [{'value': '10.50.100.100', 'comment': 'Site is safe now'}]},
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Tenant-ID" = "<tenant-id>"
    "Content-Type" = "application/json"
}
$body = '{
  "add": [
    {
      "value": "10.50.100.100",
      "comment": "Site had suspicious behaviour"
    }
  ],
  "remove": [
    {
      "value": "10.50.100.100",
      "comment": "Site is safe now"
    }
  ]
}'
Invoke-RestMethod -Method PATCH -Uri "https://api-<data-region>.central.sophos.com/endpoint/v1/settings/web-control/tls-decryption/excluded-websites" -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/web-control/tls-decryption/excluded-websites", strings.NewReader(`{
  "add": [
    {
      "value": "10.50.100.100",
      "comment": "Site had suspicious behaviour"
    }
  ],
  "remove": [
    {
      "value": "10.50.100.100",
      "comment": "Site is safe now"
    }
  ]
}`))
    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/web-control/tls-decryption/excluded-websites", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Tenant-ID": "<tenant-id>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "add": [
    {
      "value": "10.50.100.100",
      "comment": "Site had suspicious behaviour"
    }
  ],
  "remove": [
    {
      "value": "10.50.100.100",
      "comment": "Site is safe now"
    }
  ]
}),
});
const data = await response.json();
console.log(data);

Responses

200 — Updated web decryption exclusion list.

Response fields

addedarray of object
Websites successfully added to the exclusion list.
Must contain at most 500 items.
A website IP, range of IPs or domain to be excluded from SSL/TLS decryption of HTTPS websites.
Show child attributesHide child attributes
valuestring
Website IP address, IP address range or domain.
commentstring
Comment indicating why the site was excluded.
removedarray of object
Websites successfully removed from the exclusion list.
Must contain at most 500 items.
A website IP, range of IPs or domain to be excluded from SSL/TLS decryption of HTTPS websites.
Show child attributesHide child attributes
valuestring
Website IP address, IP address range or domain.
commentstring
Comment indicating why the site was excluded.

Errors

Status Meaning
400 Bad request.
422 The exclusions list would exceed the limit after update.
500 Unexpected error.

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

Response examples

200

{
  "added": [
    {
      "value": "string",
      "comment": "string"
    }
  ],
  "removed": [
    {
      "value": "string",
      "comment": "string"
    }
  ]
}

See the guide for a narrative walkthrough of this API.