Skip to content

Get profile metadata

GET/profiles/metadata

Web Filtering API · Web Filtering Profile Management

Fetch a list of available website categories, groups, and presets used by web filtering profiles.

Required permissionweb-profiles:read

Parameters

Name In Type Required Description
X-Tenant-ID header string (uuid) Yes Tenant ID.

Request samples

curl -X GET "https://api-<data-region>.central.sophos.com/web-filters/v1/profiles/metadata" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"

import requests

response = requests.get(
    "https://api-<data-region>.central.sophos.com/web-filters/v1/profiles/metadata",
    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/web-filters/v1/profiles/metadata" -Headers $headers

package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, err := http.NewRequest("GET", "https://api-<data-region>.central.sophos.com/web-filters/v1/profiles/metadata", 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/web-filters/v1/profiles/metadata", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Tenant-ID": "<tenant-id>",
  },
});
const data = await response.json();
console.log(data);

Responses

200 — Success.

Response fields

presetsarray of objectrequired
Preset website category filters.
Show child attributesHide child attributes
namestringrequired
Name of the preset.
categoryGroupActionsarray of object
Define actions for groups of website categories.
A group action defines the action for a group of website categories.
Show child attributesHide child attributes
namestringrequired
Name of the group of website categories.
actionstringrequired
Action to take.
Must be one of: allow, block, warn.
categoryActionsarray of object
Defines actions for individual website categories.
Defines the action taken for a website category.
Show child attributesHide child attributes
namestringrequired
Name of the website category.
actionstringrequired
Action to take.
Must be one of: allow, block, warn.
categoriesarray of objectrequired
Grouping of website categories.
Mapping of website category to group.
Show child attributesHide child attributes
namestringrequired
Name of the website category.
groupstring
Name of the group the website category belongs to.

Errors

Status Meaning
500 Unexpected error.

All error responses share the same shape — see the error response object.

Response examples

200

{
  "presets": [
    {
      "name": "string",
      "categoryGroupActions": [
        {
          "name": "string",
          "action": "allow"
        }
      ],
      "categoryActions": [
        {
          "name": "string",
          "action": "allow"
        }
      ]
    }
  ],
  "categories": [
    {
      "name": "string",
      "group": "string"
    }
  ]
}