Skip to content

Get metadata

GET/policies/settings

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

versionstring
Metadata version.
Must match the pattern ^20\d{2}-\d{2}-\d{2}.
schemasobject
Object schemas.
itemsarray of objectrequired
List of metadata for the setting.
List of metadata for settings in the policy type.
Show child attributesHide child attributes
typestring
Policy type.
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 objectrequired
List of metadata for settings.
Setting metadata.
Show child attributesHide child attributes
namestringrequired
Setting name.
descriptionstringrequired
Setting description.
typestringrequired
Type of setting items.
Must be one of: boolean, string, integer, object, arrayOfBooleans, arrayOfStrings, arrayOfIntegers, arrayOfObjects.
useValidOnlyInBasePolicyboolean
Whether this setting can only be used by the base policy.
useValidOnlyInAdditionalPoliciesboolean
Whether this setting can only be used by additional policies.
readOnlyInBasePolicyboolean
Whether this setting is read-only in the base policy.
readOnlyInAdditionalPoliciesboolean
Whether this setting is read-only in additional policies.
schemastring
Setting schema. Applies only when 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 8required

Option 1

Show child attributesHide child attributes
valuebooleanrequired
recommendedValueboolean
sophosManagedboolean
Whether 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 booleanrequired
recommendedValuearray of boolean

Option 3

Show child attributesHide child attributes
valueintegerrequired
unitstring
Must match the pattern [a-z]{1,20}.
recommendedValueinteger

Option 4

Show child attributesHide child attributes
valuearray of integerrequired
unitstring
Must match the pattern [a-z]{1,20}.
recommendedValuearray of integer

Option 5

Show child attributesHide child attributes
valuestringrequired
Must match the pattern ^$|^(?=.*\S).*$.
formatstring
Format of setting item value.
Must match the pattern ^[a-z][a-zA-Z0-9]{0,24}$.
recommendedValuestring
Must match the pattern ^$|^(?=.*\S).*$.
sophosManagedboolean
Whether 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 stringrequired
Each item must match the pattern ^$|^(?=.*\S).*$.
formatstring
Format of setting item value.
Must match the pattern ^[a-z][a-zA-Z0-9]{0,24}$.
recommendedValuearray of string
Each item must match the pattern ^$|^(?=.*\S).*$.

Option 7

Show child attributesHide child attributes
valueobjectrequired
recommendedValueobject

Option 8

Show child attributesHide child attributes
valuearray of objectrequired
recommendedValuearray of object
allowedValuesarray of Option 1 or Option 2 or Option 3 or Option 4 or Option 5 or Option 6 or Option 7 or Option 8

Option 1

Show child attributesHide child attributes
valuebooleanrequired
recommendedValueboolean
sophosManagedboolean
Whether 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 booleanrequired
recommendedValuearray of boolean

Option 3

Show child attributesHide child attributes
valueintegerrequired
unitstring
Must match the pattern [a-z]{1,20}.
recommendedValueinteger

Option 4

Show child attributesHide child attributes
valuearray of integerrequired
unitstring
Must match the pattern [a-z]{1,20}.
recommendedValuearray of integer

Option 5

Show child attributesHide child attributes
valuestringrequired
Must match the pattern ^$|^(?=.*\S).*$.
formatstring
Format of setting item value.
Must match the pattern ^[a-z][a-zA-Z0-9]{0,24}$.
recommendedValuestring
Must match the pattern ^$|^(?=.*\S).*$.
sophosManagedboolean
Whether 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 stringrequired
Each item must match the pattern ^$|^(?=.*\S).*$.
formatstring
Format of setting item value.
Must match the pattern ^[a-z][a-zA-Z0-9]{0,24}$.
recommendedValuearray of string
Each item must match the pattern ^$|^(?=.*\S).*$.

Option 7

Show child attributesHide child attributes
valueobjectrequired
recommendedValueobject

Option 8

Show child attributesHide child attributes
valuearray of objectrequired
recommendedValuearray of object
defaultFormatstring
Format of setting item value.
Must match the pattern ^[a-z][a-zA-Z0-9]{0,24}$.
allowedFormatsarray of string
Each item must match the pattern ^[a-z][a-zA-Z0-9]{0,24}$.
defaultUnitstring
Unit of setting item value.
Must match the pattern ^[a-z][a-zA-Z0-9]{0,24}$.
allowedUnitsarray of string
Each item must match the pattern ^[a-z][a-zA-Z0-9]{0,24}$.
limitobject
Limit values of a setting.
Show child attributesHide child attributes
minintegerrequired
Minimum value of the setting.
maxintegerrequired
Maximum value of the setting.
parentstring
The parent's setting key.
examplesarray of string
Examples 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.