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]+$.defaultValueobjectrequiredShow child attributesHide child attributes
commentstringUser comment explaining why this setting value was chosen.
Must be at most 100 characters long.
Must be at most 100 characters long.
allowedValuesarray of objectShow child attributesHide child attributes
commentstringUser comment explaining why this setting value was chosen.
Must be at most 100 characters long.
Must be at most 100 characters long.
defaultFormatstringFormat 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": {
"comment": "string"
},
"allowedValues": [
{
"comment": "string"
}
],
"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.