# 端口流量排行

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /admin/switchs/top/traffic/{datacenter_id:[0-9]+}:
    get:
      summary: 端口流量排行
      deprecated: false
      description: 获取指定数据中心的端口流量排行榜
      tags:
        - DCIM Backend API/交换机管理/交换机管理
        - 交换机管理
      parameters:
        - name: datacenter_id
          in: path
          description: 数据中心ID
          required: true
          example: 0
          schema:
            type: integer
        - name: datacenter_id:[0-9]+
          in: path
          description: ''
          required: true
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: 获取成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - true
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        port_id:
                          type: integer
                          description: 端口ID
                          examples:
                            - 1
                        port_name:
                          type: string
                          description: 端口名称
                          examples:
                            - Gi1/0/1
                        switch_name:
                          type: string
                          description: 交换机名称
                          examples:
                            - switch-01
                        traffic:
                          type: number
                          description: 流量值(Mbps)
                          examples:
                            - 100.5
                      x-apifox-orders:
                        - port_id
                        - port_name
                        - switch_name
                        - traffic
                x-apifox-orders:
                  - success
                  - data
          headers: {}
          x-apifox-name: ''
      security: []
      x-apifox-folder: DCIM Backend API/交换机管理/交换机管理
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/7638028/apis/api-403221462-run
components:
  schemas: {}
  securitySchemes:
    Token:
      type: apikey
      in: header
      name: access-token
    PlatformToken:
      type: apikey
      in: header
      name: token
      description: 平台登录凭证。对接方请向平台申请专用 API 账号并使用其登录 token。
    UserAuth:
      type: bearer
      scheme: bearer
servers: []
security: []

```
