Get metadata¶
GET/
Endpoint API · Policy Management
Supported metadata.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
policyType | query | string | No | Policy type. Must be one of: threat-protection, peripheral-control, application-control, data-collection-and-investigation, device-encryption, web-control, agent-updating, windows-firewall, endpoint-dns-protection, server-threat-protection, server-peripheral-control, server-application-control, server-web-control, server-lockdown, server-agent-updating, server-windows-firewall, server-file-integrity-monitoring, server-linux-runtime-detection, server-data-collection-and-investigation. |
Request samples¶
curl -X GET "https://api-<data-region>.central.sophos.com/endpoint/v1/policies/settings" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"
import requests
response = requests.get(
"https://api-<data-region>.central.sophos.com/endpoint/v1/policies/settings",
headers={
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Tenant-ID" = "<tenant-id>"
}
Invoke-RestMethod -Method GET -Uri "https://api-<data-region>.central.sophos.com/endpoint/v1/policies/settings" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api-<data-region>.central.sophos.com/endpoint/v1/policies/settings", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <access-token>")
req.Header.Set("X-Tenant-ID", "<tenant-id>")
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/policies/settings", {
method: "GET",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
200 — List of setting metadatas.¶
Response fields
versionstringMetadata version.
Must match the pattern
Must match the pattern
^20\d{2}-\d{2}-\d{2}.schemasobjectObject schemas.
itemsarray of objectrequiredList of metadata for the setting.
List of metadata for settings in the policy type.
Show child attributesHide child attributes
typestringPolicy type.
Must be one of:
Must be one of:
threat-protection, peripheral-control, application-control, web-control, agent-updating, windows-firewall, device-encryption, data-collection-and-investigation, endpoint-dns-protection, server-threat-protection, server-peripheral-control, server-application-control, server-web-control, server-lockdown, server-agent-updating, server-windows-firewall, server-file-integrity-monitoring, server-linux-runtime-detection, server-data-collection-and-investigation.itemsarray of objectrequiredList of metadata for settings.
Setting metadata.
Show child attributesHide child attributes
namestringrequiredSetting name.
descriptionstringrequiredSetting description.
typestringrequiredType of setting items.
Must be one of:
Must be one of:
boolean, string, integer, object, arrayOfBooleans, arrayOfStrings, arrayOfIntegers, arrayOfObjects.useValidOnlyInBasePolicybooleanWhether this setting can only be used by the base policy.
useValidOnlyInAdditionalPoliciesbooleanWhether this setting can only be used by additional policies.
readOnlyInBasePolicybooleanWhether this setting is read-only in the base policy.
readOnlyInAdditionalPoliciesbooleanWhether this setting is read-only in additional policies.
schemastringSetting schema. Applies only when
Must match the pattern
type is object or arrayOfObjects.Must match the pattern
^[a-z]+[a-zA-Z]+$.defaultValueOption 1 or Option 2 or Option 3 or Option 4 or Option 5 or Option 6 or Option 7 or Option 8requiredOption 1
Show child attributesHide child attributes
valuebooleanrequiredrecommendedValuebooleansophosManagedbooleanWhether the setting is managed by Sophos. If true, the value of the setting is derived from its default value and can be changed by Sophos.
Option 2
Show child attributesHide child attributes
valuearray of booleanrequiredrecommendedValuearray of booleanOption 3
Show child attributesHide child attributes
valueintegerrequiredunitstringMust match the pattern
[a-z]{1,20}.recommendedValueintegerOption 4
Show child attributesHide child attributes
valuearray of integerrequiredunitstringMust match the pattern
[a-z]{1,20}.recommendedValuearray of integerOption 5
Show child attributesHide child attributes
valuestringrequiredMust match the pattern
^$|^(?=.*\S).*$.formatstringFormat of setting item value.
Must match the pattern
Must match the pattern
^[a-z][a-zA-Z0-9]{0,24}$.recommendedValuestringMust match the pattern
^$|^(?=.*\S).*$.sophosManagedbooleanWhether the setting is managed by Sophos. If true, the value of the setting is derived from its default value and can be changed by Sophos.
Option 6
Show child attributesHide child attributes
valuearray of stringrequiredEach item must match the pattern
^$|^(?=.*\S).*$.formatstringFormat of setting item value.
Must match the pattern
Must match the pattern
^[a-z][a-zA-Z0-9]{0,24}$.recommendedValuearray of stringEach item must match the pattern
^$|^(?=.*\S).*$.Option 7
Show child attributesHide child attributes
valueobjectrequiredrecommendedValueobjectOption 8
Show child attributesHide child attributes
valuearray of objectrequiredrecommendedValuearray of objectallowedValuesarray of Option 1 or Option 2 or Option 3 or Option 4 or Option 5 or Option 6 or Option 7 or Option 8Option 1
Show child attributesHide child attributes
valuebooleanrequiredrecommendedValuebooleansophosManagedbooleanWhether the setting is managed by Sophos. If true, the value of the setting is derived from its default value and can be changed by Sophos.
Option 2
Show child attributesHide child attributes
valuearray of booleanrequiredrecommendedValuearray of booleanOption 3
Show child attributesHide child attributes
valueintegerrequiredunitstringMust match the pattern
[a-z]{1,20}.recommendedValueintegerOption 4
Show child attributesHide child attributes
valuearray of integerrequiredunitstringMust match the pattern
[a-z]{1,20}.recommendedValuearray of integerOption 5
Show child attributesHide child attributes
valuestringrequiredMust match the pattern
^$|^(?=.*\S).*$.formatstringFormat of setting item value.
Must match the pattern
Must match the pattern
^[a-z][a-zA-Z0-9]{0,24}$.recommendedValuestringMust match the pattern
^$|^(?=.*\S).*$.sophosManagedbooleanWhether the setting is managed by Sophos. If true, the value of the setting is derived from its default value and can be changed by Sophos.
Option 6
Show child attributesHide child attributes
valuearray of stringrequiredEach item must match the pattern
^$|^(?=.*\S).*$.formatstringFormat of setting item value.
Must match the pattern
Must match the pattern
^[a-z][a-zA-Z0-9]{0,24}$.recommendedValuearray of stringEach item must match the pattern
^$|^(?=.*\S).*$.Option 7
Show child attributesHide child attributes
valueobjectrequiredrecommendedValueobjectOption 8
Show child attributesHide child attributes
valuearray of objectrequiredrecommendedValuearray of objectdefaultFormatstringFormat of setting item value.
Must match the pattern
Must match the pattern
^[a-z][a-zA-Z0-9]{0,24}$.allowedFormatsarray of stringEach item must match the pattern
^[a-z][a-zA-Z0-9]{0,24}$.defaultUnitstringUnit of setting item value.
Must match the pattern
Must match the pattern
^[a-z][a-zA-Z0-9]{0,24}$.allowedUnitsarray of stringEach item must match the pattern
^[a-z][a-zA-Z0-9]{0,24}$.limitobjectLimit values of a setting.
Show child attributesHide child attributes
minintegerrequiredMinimum value of the setting.
maxintegerrequiredMaximum value of the setting.
parentstringThe parent's setting key.
examplesarray of stringExamples of the setting.
Errors¶
| Status | Meaning |
|---|---|
500 | Unexpected error. |
All error responses share the same shape — see the error response object.
Response examples¶
200¶
{
"version": "string",
"schemas": {},
"items": [
{
"type": "threat-protection",
"items": [
{
"name": "string",
"description": "string",
"type": "boolean",
"useValidOnlyInBasePolicy": true,
"useValidOnlyInAdditionalPolicies": true,
"readOnlyInBasePolicy": true,
"readOnlyInAdditionalPolicies": true,
"schema": "string",
"defaultValue": {
"value": true,
"recommendedValue": true
},
"allowedValues": [
{
"value": true,
"recommendedValue": true
}
],
"defaultFormat": "string",
"allowedFormats": [
"string"
],
"defaultUnit": "string",
"allowedUnits": [
"string"
],
"limit": {
"min": 0,
"max": 0
},
"parent": "string",
"examples": [
"string"
]
}
]
}
]
}
See the guide for a narrative walkthrough of this API.