openapi: 3.0.0 info: title: amlight/flow_stats version: v1 description: Flow structures and statistics paths: /api/amlight/flow_stats/v1/flow/stats: get: tags: - object summary: Return flow stats. description: Return the stats of flows given a list of dpids or the stats of all flows if no dpid. parameters: - name: dpid schema: type: array items: type: string description: List of switch ids required: false in: query example: ["00:00:00:00:00:00:00:01","00:00:00:00:00:00:00:02"] responses: 200: description: Describe a successful call. content: application/json: schema: type: object properties: switch: type: object properties: flow_id: type: string example: '2e8155af1a85644a166b28deb5af1f79' value: type: object properties: byte_count: type: integer format: int16 example: 148 duration_sec: type: integer format: int16 example: 1589 duration_nsec: type: integer format: int64 example: 556000000 packet_count: type: integer format: int64 example: 2 cookie: type: integer format: int64 example: 12310228866111668291 priority: type: integer format: int64 example: 32768 match: type: object /api/amlight/flow_stats/v1/packet_count/{flow_id}: get: summary: Packet count of an specific flow. description: Counters of a flow. parameters: - name: flow_id schema: type: string required: true description: Flow ID in: path responses: 200: description: Counters ok content: application/json: schema: type: object properties: flow_id: type: string description: Flow ID example: 263c85082b6d446cd7b72e1a5deae428 packet_counter: type: integer description: Number of packets that matched the flow example: 42 packet_per_second: type: number description: Packets per second since flow creation example: 2.345 404: description: Does not exist content: application/json: schema: type: string example: Flow not found /api/amlight/flow_stats/v1/bytes_count/{flow_id}: get: summary: Bytes count of an specific flow. description: Counter per byte of a flow. parameters: - name: flow_id schema: type: string required: true description: Flow ID in: path responses: 200: description: Counters ok content: application/json: schema: type: object properties: flow_id: type: string description: Flow ID example: 263c85082b6d446cd7b72e1a5deae428 bytes_counter: type: integer description: Number of bytes in packets that matched the flow example: 427 bits_per_second: type: number description: Bits per second since flow creation example: 25.345 404: description: Does not exist content: application/json: schema: type: string example: Flow not found /api/amlight/flow_stats/v1/packet_count/per_flow/{dpid}: get: summary: Per flow packet count. description: Packet count per flow of a switch parameters: - name: dpid schema: type: string required: true description: Datapath ID in: path responses: 200: description: Counters ok content: application/json: schema: type: array items: type: object properties: flow_id: type: string description: Flow ID example: 263c85082b6d446cd7b72e1a5deae428 packet_counter: type: integer description: Number of packets that matched the flow example: 42 packet_per_second: type: number description: Packets per second since flow creation example: 2.345 404: description: Does not exist content: application/json: schema: type: string example: Switch not found /api/amlight/flow_stats/v1/bytes_count/per_flow/{dpid}: get: summary: Per flow bytes count. description: Bytes count per flow of a switch parameters: - name: dpid schema: type: string required: true description: Datapath ID in: path responses: 200: description: Counters ok content: application/json: schema: type: array items: type: object properties: flow_id: type: string description: Flow ID example: 263c85082b6d446cd7b72e1a5deae428 bytes_counter: type: integer description: Number of bytes in packets that matched the flow example: 427 bits_per_second: type: number description: Bits per second since flow creation example: 25.345 404: description: Does not exist content: application/json: schema: type: string example: Switch not found