Get profile metadata¶
GET/
Web Filtering API · Web Filtering Profile Management
Fetch a list of available website categories, groups, and presets used by web filtering profiles.
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 objectrequiredPreset website category filters.
Show child attributesHide child attributes
namestringrequiredName of the preset.
categoryGroupActionsarray of objectDefine actions for groups of website categories.
A group action defines the action for a group of website categories.
Show child attributesHide child attributes
namestringrequiredName of the group of website categories.
actionstringrequiredAction to take.
Must be one of:
Must be one of:
allow, block, warn.categoryActionsarray of objectDefines actions for individual website categories.
Defines the action taken for a website category.
Show child attributesHide child attributes
namestringrequiredName of the website category.
actionstringrequiredAction to take.
Must be one of:
Must be one of:
allow, block, warn.categoriesarray of objectrequiredGrouping of website categories.
Mapping of website category to group.
Show child attributesHide child attributes
namestringrequiredName of the website category.
groupstringName 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.