Chaitin Tech policy/channel API

策略管理/通道

OpenAPI Specification

chaitin-policy-channel-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: APISec Management account policy/channel API
  version: '26.05'
  description: Generated from APISec skyview APIView classes.
tags:
- name: policy/channel
  description: 策略管理/通道
paths:
  /policy/channel:
    post:
      summary: 渠道管控创建
      deprecated: false
      description: ''
      tags:
      - policy/channel
      parameters:
      - name: X-CS-Header-App
        in: header
        description: 应用id
        required: true
        example: '{{app}}'
        schema:
          type: string
      - name: X-CS-Header-Company
        in: header
        description: 公司id
        required: true
        example: '{{company_id}}'
        schema:
          type: string
      - name: X-CS-Header-Crypt
        in: header
        description: 加密算法,请参考:https://servaltech.feishu.cn/docs/doccnQCZ2cw32uazgNSO0DFwceb
        required: true
        example: ''
        schema:
          type: string
      - name: If-None-Match
        in: header
        description: 对于支持「ETAG」的接口,将上一次请求的响应header的Etag,填入到下一次请求。若匹配,则返回304(无变更),否则会返回新版本的数据 + 新Etag
        required: true
        example: string
        schema:
          type: string
      - name: X-CS-Header-Debug
        in: header
        description: ''
        required: true
        example: '{{debug}}'
        schema:
          type: string
      - name: Accept-Language
        in: header
        description: ''
        required: true
        example: zh
        schema:
          type: string
      - name: X-Cs-Header-Timezone
        in: header
        description: ''
        required: true
        example: Asia/Shanghai
        schema:
          type: string
      - name: Content-Type
        in: header
        description: ''
        required: true
        example: application/json
        schema:
          type: string
      - name: Accept
        in: header
        description: ''
        required: true
        example: application/json
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                mode:
                  type: string
                name:
                  type: string
                policy_group_ids:
                  type: array
                  items:
                    type: string
                description:
                  type: 'null'
                scope:
                  type: string
                period_category:
                  type: string
                period_options:
                  type: object
                  properties:
                    period_hours_value:
                      type: array
                      items:
                        type: object
                        properties:
                          begin:
                            type: string
                          end:
                            type: string
                          week:
                            type: integer
                        required:
                        - begin
                        - end
                        - week
                  required:
                  - period_hours_value
                run_model:
                  type: array
                  items:
                    type: string
                expression_fields:
                  type: array
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                      value:
                        type: array
                        items:
                          type: string
                      operator:
                        type: string
                    required:
                    - field
                    - value
                    - operator
                water_drop_action_config:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    time_window:
                      type: integer
                    time_window_unit:
                      type: string
                    actions:
                      type: array
                      items:
                        type: object
                        properties:
                          hit_trigger_op:
                            type: string
                          hit_count_trigger:
                            type: integer
                          action:
                            type: string
                          extract_file:
                            type: boolean
                          extract_file_options:
                            type: object
                            properties:
                              file_size_measure:
                                type: string
                              file_size:
                                type: integer
                            required:
                            - file_size_measure
                            - file_size
                          risk_level:
                            type: integer
                          screenshot:
                            type: boolean
                          water_drop_flag:
                            type: boolean
                          action_template_id:
                            type: string
                        required:
                        - hit_trigger_op
                        - hit_count_trigger
                        - action
                        - extract_file
                        - extract_file_options
                        - risk_level
                        - screenshot
                  required:
                  - enabled
                  - time_window
                  - time_window_unit
                  - actions
                hit_trigger_op:
                  type: string
                hit_count_trigger:
                  type: integer
                action:
                  type: string
                extract_file:
                  type: boolean
                extract_file_options:
                  type: object
                  properties:
                    file_size_measure:
                      type: string
                    file_size:
                      type: integer
                  required:
                  - file_size_measure
                  - file_size
                risk_level:
                  type: integer
                screenshot:
                  type: boolean
                category:
                  type: string
                binding_config:
                  type: object
                  properties:
                    source:
                      type: string
                    include:
                      type: object
                      properties:
                        device_ids:
                          type: array
                          items:
                            type: string
                      required:
                      - device_ids
                    exclude:
                      type: object
                      properties: {}
                  required:
                  - source
                  - include
                  - exclude
              required:
              - mode
              - name
              - policy_group_ids
              - description
              - scope
              - period_category
              - period_options
              - run_model
              - expression_fields
              - water_drop_action_config
              - hit_trigger_op
              - hit_count_trigger
              - action
              - extract_file
              - extract_file_options
              - risk_level
              - screenshot
              - category
              - binding_config
            example:
              mode: advanced
              name: 水滴发送测试_复制
              policy_group_ids:
              - ea581dad-40f7-45e0-b37a-f92878876cc9
              description: null
              scope: common
              period_category: permanent
              period_options:
                period_hours_value:
                - begin: 00:00
                  end: '23:59'
                  week: 1
                - begin: 00:00
                  end: '23:59'
                  week: 2
                - begin: 00:00
                  end: '23:59'
                  week: 3
                - begin: 00:00
                  end: '23:59'
                  week: 4
                - begin: 00:00
                  end: '23:59'
                  week: 5
                - begin: 00:00
                  end: '23:59'
                  week: 6
                - begin: 00:00
                  end: '23:59'
                  week: 7
              run_model:
              - online
              - offline
              expression_fields:
              - field: channel
                value:
                - a5b60b18-c079-4cbf-accb-e94011a4a680
                operator: contains
              - field: file_size_limit_mb
                value: 10
                operator: lt
              water_drop_action_config:
                enabled: true
                time_window: 24
                time_window_unit: hour
                actions:
                - hit_trigger_op: eq
                  hit_count_trigger: 1
                  action: allow
                  extract_file: false
                  extract_file_options:
                    file_size_measure: MB
                    file_size: 10
                  risk_level: 4
                  screenshot: true
                - hit_trigger_op: gt
                  hit_count_trigger: 1
                  action: approval
                  extract_file: false
                  extract_file_options:
                    file_size_measure: MB
                    file_size: 10
                  water_drop_flag: true
                  risk_level: 3
                  action_template_id: 8c001a0a-e697-451a-9b59-9d8260c8f40f
                  screenshot: true
              hit_trigger_op: eq
              hit_count_trigger: 1
              action: allow
              extract_file: false
              extract_file_options:
                file_size_measure: MB
                file_size: 10
              risk_level: 4
              screenshot: true
              category: channel
              binding_config:
                source: channel
                include:
                  device_ids:
                  - 8aece6fc-7990-4aea-bcdb-f7e0201c01e4
                exclude: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example: {}
      security: []