Trellix Web Gateway Lists API

Manage custom lists used in policy rules

OpenAPI Specification

trellix-web-gateway-lists-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Trellix Web Gateway Policy Anti-Malware Lists API
  description: API for creating, updating, and managing security policies, rule sets, and configurations for web filtering and threat prevention on Trellix Web Gateway (formerly McAfee Web Gateway). Provides programmatic access to policy rules, URL filter settings, anti-malware settings, and SSL scanning configurations.
  version: '1.0'
  contact:
    name: Trellix Support
    url: https://www.trellix.com/support/
    email: support@trellix.com
  termsOfService: https://www.trellix.com/legal/terms-of-use/
servers:
- url: https://{mwg-server}:{port}/Konfigurator/REST/policy
  description: Trellix Web Gateway Policy Endpoint
  variables:
    mwg-server:
      default: mwg.example.com
      description: Hostname or IP address of the Web Gateway appliance
    port:
      default: '4712'
      description: Management port for the REST API
security:
- cookieAuth: []
tags:
- name: Lists
  description: Manage custom lists used in policy rules
paths:
  /lists:
    get:
      operationId: listCustomLists
      summary: List custom lists
      description: Retrieve all custom lists configured on the appliance, including URL whitelists, blacklists, and IP address lists.
      tags:
      - Lists
      responses:
        '200':
          description: Custom lists returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  lists:
                    type: array
                    items:
                      $ref: '#/components/schemas/CustomList'
        '401':
          description: Unauthorized
  /lists/{listId}:
    get:
      operationId: getCustomList
      summary: Get a custom list
      description: Retrieve the contents and metadata of a specific custom list.
      tags:
      - Lists
      parameters:
      - $ref: '#/components/parameters/listId'
      responses:
        '200':
          description: Custom list returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomList'
        '401':
          description: Unauthorized
        '404':
          description: List not found
    put:
      operationId: updateCustomList
      summary: Update a custom list
      description: Replace the contents of a specific custom list with new entries.
      tags:
      - Lists
      parameters:
      - $ref: '#/components/parameters/listId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomListUpdate'
      responses:
        '200':
          description: Custom list updated
        '400':
          description: Invalid list data
        '401':
          description: Unauthorized
        '404':
          description: List not found
  /lists/{listId}/entries:
    post:
      operationId: addListEntry
      summary: Add an entry to a custom list
      description: Add a new entry to an existing custom list.
      tags:
      - Lists
      parameters:
      - $ref: '#/components/parameters/listId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListEntry'
      responses:
        '201':
          description: Entry added successfully
        '400':
          description: Invalid entry
        '401':
          description: Unauthorized
        '404':
          description: List not found
  /lists/{listId}/entries/{entryId}:
    delete:
      operationId: deleteListEntry
      summary: Delete an entry from a custom list
      description: Remove a specific entry from a custom list.
      tags:
      - Lists
      parameters:
      - $ref: '#/components/parameters/listId'
      - $ref: '#/components/parameters/entryId'
      responses:
        '200':
          description: Entry deleted successfully
        '401':
          description: Unauthorized
        '404':
          description: Entry or list not found
components:
  parameters:
    listId:
      name: listId
      in: path
      required: true
      description: Unique identifier of the custom list
      schema:
        type: string
    entryId:
      name: entryId
      in: path
      required: true
      description: Unique identifier of the list entry
      schema:
        type: string
  schemas:
    CustomList:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the list
        name:
          type: string
          description: Display name of the list
        type:
          type: string
          enum:
          - url
          - ip
          - string
          - regex
          - mediaType
          - category
          description: Type of entries in the list
        description:
          type: string
          description: Description of the list purpose
        entryCount:
          type: integer
          description: Number of entries in the list
        entries:
          type: array
          items:
            $ref: '#/components/schemas/ListEntry'
          description: List entries
    CustomListUpdate:
      type: object
      properties:
        name:
          type: string
          description: Updated list name
        description:
          type: string
          description: Updated list description
        entries:
          type: array
          items:
            $ref: '#/components/schemas/ListEntry'
          description: Complete replacement entries for the list
    ListEntry:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the entry
        value:
          type: string
          description: Entry value (URL, IP, string, etc.)
        description:
          type: string
          description: Optional description of the entry
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: JSESSIONID
      description: Session cookie obtained via the Konfigurator REST /login endpoint.
externalDocs:
  description: Trellix Web Gateway Policy API Documentation
  url: https://docs.trellix.com/bundle/web-gateway-policy-api