Update websites¶
PATCH/
Endpoint API · Web Control
Add and remove websites excluded from SSL/TLS decryption.
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 objectWebsite to add to the exclusion list.
Must contain at most 500 items.
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
valuestringrequiredWebsite IP address, IP address range or domain.
Must match the pattern
Must match the pattern
^[-:0-9a-z./]{3,2048}$.commentstringComment indicating why the site was excluded.
Must match the pattern
Must match the pattern
^[-\p{L}\p{Nl}\d ,.']{0,300}$.removearray of objectWebsite to remove from the exclusion list.
Must contain at most 500 items.
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
valuestringrequiredWebsite IP address, IP address range or domain.
Must match the pattern
Must match the pattern
^[-:0-9a-z./]{3,2048}$.commentstringComment indicating why the site was excluded.
Must match the pattern
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 objectWebsites successfully added to the exclusion list.
Must contain at most 500 items.
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
valuestringWebsite IP address, IP address range or domain.
commentstringComment indicating why the site was excluded.
removedarray of objectWebsites successfully removed from the exclusion list.
Must contain at most 500 items.
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
valuestringWebsite IP address, IP address range or domain.
commentstringComment 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.
See the guide for a narrative walkthrough of this API.