Update settings¶
PATCH/
Endpoint API · Event Journal
Update settings for event journal size and disk space limits. If you specify both a maximum disk space and a maximum journal size, the lower of these limits is used.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
endpointType | path | string (enum) | Yes | Endpoint type. Must be one of: computer, server. |
Request body¶
Content type: application/json
Request body fields
useRecommendedbooleanrequiredShows if the recommended setting is required.
diskSpaceLimitInMBintegerMaximum size of the event journal (MB).
Must be ≥ 300 and ≤ 30000.
Must be ≥ 300 and ≤ 30000.
diskSpaceLimitAsPercentageintegerDisk space limit for the event journal (percentage). The value 0 will mean Disk space limit is not specified. Supported values [0, 10, 20, 30, 40].
Must be ≥ 0 and ≤ 40. Must be a multiple of 10.
Must be ≥ 0 and ≤ 40. Must be a multiple of 10.
Request samples¶
curl -X PATCH "https://api-<data-region>.central.sophos.com/endpoint/v1/settings/event-journal/computer" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>" -H "Content-Type: application/json" -d "{
\"useRecommended\": false,
\"diskSpaceLimitInMB\": 15000,
\"diskSpaceLimitAsPercentage\": 20
}"
import requests
response = requests.patch(
"https://api-<data-region>.central.sophos.com/endpoint/v1/settings/event-journal/computer",
headers={
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
"Content-Type": "application/json",
},
json={ 'useRecommended': False,
'diskSpaceLimitInMB': 15000,
'diskSpaceLimitAsPercentage': 20},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Tenant-ID" = "<tenant-id>"
"Content-Type" = "application/json"
}
$body = '{
"useRecommended": false,
"diskSpaceLimitInMB": 15000,
"diskSpaceLimitAsPercentage": 20
}'
Invoke-RestMethod -Method PATCH -Uri "https://api-<data-region>.central.sophos.com/endpoint/v1/settings/event-journal/computer" -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/event-journal/computer", strings.NewReader(`{
"useRecommended": false,
"diskSpaceLimitInMB": 15000,
"diskSpaceLimitAsPercentage": 20
}`))
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/event-journal/computer", {
method: "PATCH",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"useRecommended": false,
"diskSpaceLimitInMB": 15000,
"diskSpaceLimitAsPercentage": 20
}),
});
const data = await response.json();
console.log(data);
Responses¶
200 — Event journal settings updated.¶
Response fields
useRecommendedbooleanrequiredShows if the recommended setting is being used.
diskSpaceLimitInMBobjectrequiredShow child attributesHide child attributes
recommendedValueintegerrequiredMaximum size of the event journal (MB).
Must be ≥ 300 and ≤ 30000.
Must be ≥ 300 and ≤ 30000.
valueintegerMaximum size of the event journal (MB).
Must be ≥ 300 and ≤ 30000.
Must be ≥ 300 and ≤ 30000.
diskSpaceLimitAsPercentageobjectrequiredShow child attributesHide child attributes
recommendedValueintegerrequiredDisk space limit for the event journal (percentage). The value 0 will mean Disk space limit is not specified. Supported values [0, 10, 20, 30, 40].
Must be ≥ 0 and ≤ 40. Must be a multiple of 10.
Must be ≥ 0 and ≤ 40. Must be a multiple of 10.
valueintegerDisk space limit for the event journal (percentage). The value 0 will mean Disk space limit is not specified. Supported values [0, 10, 20, 30, 40].
Must be ≥ 0 and ≤ 40. Must be a multiple of 10.
Must be ≥ 0 and ≤ 40. Must be a multiple of 10.
Errors¶
| Status | Meaning |
|---|---|
400 | Bad request. |
401 | Authentication required. |
403 | Authorization required. |
404 | Customer not found. |
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.