Skip to content

Get metadata

GET/policies/settings

Endpoint API · Policy Management

Supported metadata.

Required permissionendpoint-policy:read

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]+$.
defaultValueobjectrequired
Show child attributesHide child attributes
commentstring
User comment explaining why this setting value was chosen.
Must be at most 100 characters long.
allowedValuesarray of object
Show child attributesHide child attributes
commentstring
User comment explaining why this setting value was chosen.
Must be at most 100 characters long.
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": {
            "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.