Content Filter Rules

Get Content Filter Rules

Get all Content Filter Rules in a configuration

GET/api/v4.0/conf/{config}/content-filter-rules
Path parameters
config*Config
Response

Content Filter Rules retrieved successfully

Body
totalinteger
Example: 1
itemsarray of ContentFilterRule
Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "total": 1,
  "items": [
    {
      "category": "text",
      "description": "text",
      "id": "text",
      "msg": "text",
      "name": "text",
      "operand": "text",
      "subcategory": "text",
      "tags": [
        "text"
      ]
    }
  ]
}

Modify Content Filter Rules

Update an existing set of Content Filter Rules for a configuration

PUT/api/v4.0/conf/{config}/content-filter-rules
Path parameters
config*Config
Body
category*Category

Category of the rule

descriptionDescription
id*Id
msg*Message

Log message for this rule

name*Name
operand*Operand

Matching domain(s) regex

risk*Risk Level

Risk level of this rule, between 1 (lowest risk) and 5 (highest risk)

subcategory*Subcategory

Subcategory of the rule

tagsTags List

List of tags to apply

Response

Content Filter Rules updated successfully

Body
message*Message

Information about successful update operation

Example: "Successfully updated entry"
Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify([
      {
        "id": "text",
        "name": "text",
        "msg": "text",
        "operand": "text",
        "category": "text",
        "subcategory": "text"
      }
    ]),
});
const data = await response.json();
Response
{
  "message": "Successfully updated entry"
}

Create Content Filter Rules

Create a complete set of Content Filter Rules for a configuration

POST/api/v4.0/conf/{config}/content-filter-rules
Path parameters
config*Config
Body
category*Category

Category of the rule

descriptionDescription
id*Id
msg*Message

Log message for this rule

name*Name
operand*Operand

Matching domain(s) regex

risk*Risk Level

Risk level of this rule, between 1 (lowest risk) and 5 (highest risk)

subcategory*Subcategory

Subcategory of the rule

tagsTags List

List of tags to apply

Response

Content Filter Rules created successfully

Body
message*Message

Information about successful create operation

Example: "Successfully created entry"
Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify([
      {
        "id": "text",
        "name": "text",
        "msg": "text",
        "operand": "text",
        "category": "text",
        "subcategory": "text"
      }
    ]),
});
const data = await response.json();
Response
{
  "message": "Successfully created entry"
}

Delete Content Filter Rules

Delete all Content Filter Rules in a configuration

DELETE/api/v4.0/conf/{config}/content-filter-rules
Path parameters
config*Config
Response

Content Filter Rules deleted successfully

Body
message*Message

Information about successful delete operation

Example: "Successfully deleted entry"
Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "message": "Successfully deleted entry"
}

Get single Content Filter Rule

Get a Content Filter Rule from the specified configuration

GET/api/v4.0/conf/{config}/content-filter-rules/{entry_id}
Path parameters
config*Config
entry_id*Entry
Response

Content Filter Rule retrieved successfully

Body
category*Category

Category of the rule

descriptionDescription
id*Id
msg*Message

Log message for this rule

name*Name
operand*Operand

Matching domain(s) regex

risk*Risk Level

Risk level of this rule, between 1 (lowest risk) and 5 (highest risk)

subcategory*Subcategory

Subcategory of the rule

tagsTags List

List of tags to apply

Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules/{entry_id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "category": "text",
  "description": "text",
  "id": "text",
  "msg": "text",
  "name": "text",
  "operand": "text",
  "subcategory": "text",
  "tags": [
    "text"
  ]
}

Modify a single Content Filter Rule

Update an individual Content Filter Rule within a configuration

PUT/api/v4.0/conf/{config}/content-filter-rules/{entry_id}
Path parameters
config*Config
entry_id*Entry
Body
category*Category

Category of the rule

descriptionDescription
id*Id
msg*Message

Log message for this rule

name*Name
operand*Operand

Matching domain(s) regex

risk*Risk Level

Risk level of this rule, between 1 (lowest risk) and 5 (highest risk)

subcategory*Subcategory

Subcategory of the rule

tagsTags List

List of tags to apply

Response

Content Filter Rule updated successfully

Body
message*Message

Information about successful update operation

Example: "Successfully updated entry"
Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules/{entry_id}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "id": "text",
      "name": "text",
      "msg": "text",
      "operand": "text",
      "category": "text",
      "subcategory": "text"
    }),
});
const data = await response.json();
Response
{
  "message": "Successfully updated entry"
}

Create single Content Filter Rule

Create an individual Content Filter Rule within a configuration

POST/api/v4.0/conf/{config}/content-filter-rules/{entry_id}
Path parameters
config*Config
entry_id*Entry
Body
category*Category

Category of the rule

descriptionDescription
id*Id
msg*Message

Log message for this rule

name*Name
operand*Operand

Matching domain(s) regex

risk*Risk Level

Risk level of this rule, between 1 (lowest risk) and 5 (highest risk)

subcategory*Subcategory

Subcategory of the rule

tagsTags List

List of tags to apply

Response

Content Filter Rule created successfully

Body
message*Message

Information about successful create operation

Example: "Successfully created entry"
Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules/{entry_id}', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "id": "text",
      "name": "text",
      "msg": "text",
      "operand": "text",
      "category": "text",
      "subcategory": "text"
    }),
});
const data = await response.json();
Response
{
  "message": "Successfully created entry"
}

Delete single Content Filter Rule

Delete an individual Content Filter Rule from the specified configuration

DELETE/api/v4.0/conf/{config}/content-filter-rules/{entry_id}
Path parameters
config*Config
entry_id*Entry
Response

Content Filter Rule deleted successfully

Body
message*Message

Information about successful delete operation

Example: "Successfully deleted entry"
Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules/{entry_id}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "message": "Successfully deleted entry"
}

Get Content Filter Rules version list

Get list of versions of Content Filter Rules in a configuration

GET/api/v4.0/conf/{config}/content-filter-rules/versions
Path parameters
config*Config
Response

Content Filter Rules version list retrieved successfully

Body
totalinteger
Example: 1
itemsarray of VersionEntry
Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules/versions', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "total": 1,
  "items": [
    {
      "author": "text",
      "email": "name@gmail.com",
      "message": "text",
      "date": "2024-09-19T15:57:58.300Z",
      "version": "42bcc1282349db1e5791484c3d69420b1d8a8bc1",
      "parents": [
        "f44073242093228b45bff7eb7a065559fa9b46aa"
      ]
    }
  ]
}

Get version of Content Filter Rule set

Get a specific version of a Content Filter Rule set

GET/api/v4.0/conf/{config}/content-filter-rules/versions/{version}
Path parameters
config*Config
version*Version
Response

Content Filter Rule set retrieved successfully

Body
totalinteger
Example: 1
itemsarray of ContentFilterRule
Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules/versions/{version}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "total": 1,
  "items": [
    {
      "category": "text",
      "description": "text",
      "id": "text",
      "msg": "text",
      "name": "text",
      "operand": "text",
      "subcategory": "text",
      "tags": [
        "text"
      ]
    }
  ]
}

Revert a Content Filter Rule to the specified version

Set a previous Content Filter Rule version to be the current one

PUT/api/v4.0/conf/{config}/content-filter-rules/versions/{version}/revert
Path parameters
config*Config
version*Version
Response

Content Filter Rule reversion was successful

Body
message*Message

Information about successful update operation

Example: "Successfully updated entry"
Request
const response = await fetch('/api/v4.0/conf/{config}/content-filter-rules/versions/{version}/revert', {
    method: 'PUT',
    headers: {},
});
const data = await response.json();
Response
{
  "message": "Successfully updated entry"
}

Last updated