SafeLine Security Policies API

Security policy and rule group management

Operations 3

GET /api/PolicyGroupAPI List Policy Groups #
POST /api/PolicyGroupAPI Create Policy Group #
GET /api/PolicyRuleAPI List Policy Rules #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/safeline-security-policies-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

safeline-security-policies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SafeLine Management ACL Rules Security Policies API
  description: SafeLine Management API provides programmatic control of the SafeLine WAF (Web Application Firewall) including application/website management, security policy configuration, ACL rules, SSL certificate management, user account management, attack event analysis, and system configuration. SafeLine is an open-source self-hosted WAF built by Chaitin Technology protecting over 1 million websites with over 30 billion daily HTTP requests.
  version: 2.0.0
  contact:
    name: Chaitin Technology
    url: https://waf.chaitin.com/
  license:
    name: GPL-3.0
    url: https://github.com/chaitin/SafeLine/blob/main/LICENSE
servers:
- url: https://{host}:9443
  description: SafeLine Management API (default port 9443)
  variables:
    host:
      default: localhost
      description: SafeLine management server hostname or IP
security:
- APITokenAuth: []
tags:
- name: Security Policies
  description: Security policy and rule group management
paths:
  /api/PolicyGroupAPI:
    get:
      operationId: listPolicyGroups
      summary: List Policy Groups
      description: Retrieves security policy groups configured in SafeLine.
      tags:
      - Security Policies
      responses:
        '200':
          description: Policy group list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyGroupListResponse'
    post:
      operationId: createPolicyGroup
      summary: Create Policy Group
      description: Creates a new security policy group with custom rules.
      tags:
      - Security Policies
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePolicyGroupRequest'
      responses:
        '200':
          description: Policy group created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyGroupResponse'
  /api/PolicyRuleAPI:
    get:
      operationId: listPolicyRules
      summary: List Policy Rules
      description: Retrieves security policy rules within policy groups.
      tags:
      - Security Policies
      parameters:
      - name: group_id
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: Policy rule list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyRuleListResponse'
components:
  schemas:
    PolicyRuleListResponse:
      type: object
      properties:
        err:
          type: string
          nullable: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/PolicyRule'
        msg:
          type: string
          nullable: true
    PolicyRule:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        action:
          type: string
        priority:
          type: integer
        enabled:
          type: boolean
        group_id:
          type: integer
    PolicyGroupListResponse:
      type: object
      properties:
        err:
          type: string
          nullable: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/PolicyGroup'
        msg:
          type: string
          nullable: true
    PolicyGroupResponse:
      type: object
      properties:
        err:
          type: string
          nullable: true
        data:
          $ref: '#/components/schemas/PolicyGroup'
        msg:
          type: string
          nullable: true
    CreatePolicyGroupRequest:
      type: object
      required:
      - name
      properties:
        name:
          type: string
        comment:
          type: string
    PolicyGroup:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        comment:
          type: string
        rule_count:
          type: integer
        create_time:
          type: string
  securitySchemes:
    APITokenAuth:
      type: apiKey
      in: header
      name: X-SLCE-API-Token
      description: API token obtained from the SafeLine management interface