Chaitin Tech report/dashboard/chart/query API

报表中心/仪表盘/图表/查询

OpenAPI Specification

chaitin-report-dashboard-chart-query-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: APISec Management account report/dashboard/chart/query API
  version: '26.05'
  description: Generated from APISec skyview APIView classes.
tags:
- name: report/dashboard/chart/query
  description: 报表中心/仪表盘/图表/查询
paths:
  /report/dashboard/chart/query:
    post:
      summary: 图表数据查询
      deprecated: false
      description: '时间列聚合支持的间隔:

        1d 1天

        1M 1月

        1h 1小时

        1m 1分钟

        1w 1周'
      tags:
      - report/dashboard/chart/query
      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:
                time_range:
                  type: object
                  properties:
                    begin:
                      type: string
                    end:
                      type: string
                  required:
                  - begin
                  - end
                queries:
                  type: array
                  items: {}
                collapse:
                  type: object
                  properties:
                    field:
                      type: string
                  required:
                  - field
                aggs:
                  type: object
                  properties:
                    bucket:
                      type: array
                      items:
                        type: object
                        properties:
                          field:
                            type: string
                          operator:
                            type: string
                        required:
                        - field
                        - operator
                    metric:
                      type: array
                      items:
                        type: object
                        properties:
                          field:
                            type: string
                          operator:
                            type: string
                        required:
                        - field
                        - operator
                  required:
                  - bucket
                  - metric
                index:
                  type: array
                  items:
                    type: string
                dsl:
                  type: boolean
                limit:
                  type: integer
              required:
              - time_range
              - queries
              - collapse
              - aggs
              - index
              - dsl
              - limit
            example:
              time_range:
                begin: '2023-03-02 11:33:15'
                end: '2023-06-22 11:33:15'
              queries: []
              collapse:
                field: md5_hash
              aggs:
                bucket:
                - field: agent_version
                  operator: terms
                - field: time
                  operator: date_histogram
                - field: risk_name
                  operator: terms
                metric:
                - field: time
                  operator: max
                - field: risk_level
                  operator: sum
              index:
              - policy_channel_log
              dsl: true
              limit: 1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example: {}
      security: []