Captures

List captures

Get a list of captures.

GET /api/v1/results/{id}/tests/{seq}/captures/{?filter,sort}

URL Parameters

Name Description
filter string (optional) See Filtering
sort string (optional) See Sorting

Response 200 OK

{
    "timestamp": "2016-04-15T15:38:53.744291122-04:00",
    "data": [
        {
            "interface": "lan",
            "filename": "cdrouter_basic_1-lan.cap"
        },
        {
            "interface": "wan",
            "filename": "cdrouter_basic_1-wan.cap"
        }
    ]
}

Get a capture

Get a capture.

GET /api/v1/results/{id}/tests/{seq}/captures/{intf}

Response 200 OK

{
    "timestamp": "2016-04-15T15:41:09.439522059-04:00",
    "data": {
        "id": "20150817160428",
        "seq": "2",
        "interface": "lan",
        "filename": "cdrouter_basic_1-lan.cap"
    }
}

Download a capture

Download a capture as a PCAP file.

GET /api/v1/results/{id}/tests/{seq}/captures/{intf}?format=cap

URL Parameters

Name Description
inline boolean (optional) If true, use “master” (-m.cap) capture file

Response 200 OK

Content-Type: application/pcap
Content-Disposition: inline; filename="{filename}.cap"

Get a capture’s summary

Get a capture’s summary.

GET /api/v1/results/{id}/tests/{seq}/captures/{intf}/summary

URL Parameters

Name Description
filter string (optional) A PCAP display filter to apply to the capture file
inline boolean (optional) If true, use “master” (-m.cap) capture file

Response 200 OK

{
    "timestamp": "2016-04-15T15:48:21.540765659-04:00",
    "data": {
        "structure": {
            "sections": [
                { "value": "No." },
                { "value": "Time" },
                { "value": "Source" },
                { "value": "Destination" },
                { "value": "Protocol" },
                { "value": "Length" },
                { "value": "Info" }
            ]
        },
        "summaries": [
            {
                "sections": [
                    { "value": "1" },
                    { "value": "16:06:51.942539" },
                    { "value": "QaCafe_dc:14:fd" },
                    { "value": "Broadcast" },
                    { "value": "ARP" },
                    { "value": "42" },
                    { "value": "Who has 192.168.1.1?  Tell 192.168.1.2" }
                ]
            },
            {
                "sections": [
                    { "value": "2" },
                    { "value": "16:06:51.942800" },
                    { "value": "ZhoneTec_30:d8:4e" },
                    { "value": "QaCafe_dc:14:fd" },
                    { "value": "ARP" },
                    { "value": "60" },
                    { "value": "192.168.1.1 is at 00:02:71:30:d8:4e" }
                ]
            }
        ]
    }
}

Get a capture’s decode

Get a capture’s decode.

GET /api/v1/results/{id}/tests/{seq}/captures/{intf}/decode

URL Parameters

Name Description
filter string (optional) A PCAP display filter to apply to the capture file
frame integer (optional) If given, only return specified frame
inline boolean (optional) If true, use “master” (-m.cap) capture file

Response 200 OK

{
    "timestamp": "2016-04-15T15:48:21.983584199-04:00",
    "data": {
        "packets": [
            {
                "protos": [
                    {
                        "name": "geninfo",
                        "pos": "0",
                        "show": "",
                        "show_name": "General information",
                        "value": "",
                        "size": "42",
                        "fields": [
                            {
                                "name": "num",
                                "show_name": "Number",
                                "size": "42",
                                "pos": "0",
                                "show": "1",
                                "fields": null
                            },
                            {
                                "name": "len",
                                "show_name": "Frame Length",
                                "size": "42",
                                "pos": "0",
                                "show": "42",
                                "fields": null
                            },
                            {
                                "name": "caplen",
                                "show_name": "Captured Length",
                                "size": "42",
                                "pos": "0",
                                "show": "42",
                                "fields": null
                            },
                            {
                                "name": "timestamp",
                                "show_name": "Captured Time",
                                "size": "42",
                                "pos": "0",
                                "show": "Aug 17, 2015 16:06:51.942539000 EDT",
                                "fields": null
                            }
                        ]
                    },
                    {
                        "name": "frame",
                        "pos": "0",
                        "show": "",
                        "show_name": "Frame 1: 42 bytes on wire (336 bits), 42 bytes captured (336 bits)",
                        "value": "",
                        "size": "42",
                        "fields": [
                            {
                                "name": "frame.encap_type",
                                "show_name": "Encapsulation type: Ethernet (1)",
                                "size": "0",
                                "pos": "0",
                                "show": "1",
                                "fields": null
                            },
                            {
                                "name": "frame.time",
                                "show_name": "Arrival Time: Aug 17, 2015 16:06:51.942539000 EDT",
                                "size": "0",
                                "pos": "0",
                                "show": "Aug 17, 2015 16:06:51.942539000 EDT",
                                "fields": null
                            },
                            {
                                "name": "frame.offset_shift",
                                "show_name": "Time shift for this packet: 0.000000000 seconds",
                                "size": "0",
                                "pos": "0",
                                "show": "0.000000000",
                                "fields": null
                            },
                            {
                                "name": "frame.time_epoch",
                                "show_name": "Epoch Time: 1439842011.942539000 seconds",
                                "size": "0",
                                "pos": "0",
                                "show": "1439842011.942539000",
                                "fields": null
                            },
                            {
                                "name": "frame.time_delta",
                                "show_name": "Time delta from previous captured frame: 0.000000000 seconds",
                                "size": "0",
                                "pos": "0",
                                "show": "0.000000000",
                                "fields": null
                            },
                            {
                                "name": "frame.time_delta_displayed",
                                "show_name": "Time delta from previous displayed frame: 0.000000000 seconds",
                                "size": "0",
                                "pos": "0",
                                "show": "0.000000000",
                                "fields": null
                            },
                            {
                                "name": "frame.time_relative",
                                "show_name": "Time since reference or first frame: 0.000000000 seconds",
                                "size": "0",
                                "pos": "0",
                                "show": "0.000000000",
                                "fields": null
                            },
                            {
                                "name": "frame.number",
                                "show_name": "Frame Number: 1",
                                "size": "0",
                                "pos": "0",
                                "show": "1",
                                "fields": null
                            },
                            {
                                "name": "frame.len",
                                "show_name": "Frame Length: 42 bytes (336 bits)",
                                "size": "0",
                                "pos": "0",
                                "show": "42",
                                "fields": null
                            },
                            {
                                "name": "frame.cap_len",
                                "show_name": "Capture Length: 42 bytes (336 bits)",
                                "size": "0",
                                "pos": "0",
                                "show": "42",
                                "fields": null
                            },
                            {
                                "name": "frame.marked",
                                "show_name": "Frame is marked: False",
                                "size": "0",
                                "pos": "0",
                                "show": "0",
                                "fields": null
                            },
                            {
                                "name": "frame.ignored",
                                "show_name": "Frame is ignored: False",
                                "size": "0",
                                "pos": "0",
                                "show": "0",
                                "fields": null
                            },
                            {
                                "name": "frame.protocols",
                                "show_name": "Protocols in frame: eth:ethertype:arp",
                                "size": "0",
                                "pos": "0",
                                "show": "eth:ethertype:arp",
                                "fields": null
                            }
                        ]
                    },
                    {
                        "name": "eth",
                        "pos": "0",
                        "show": "",
                        "show_name": "Ethernet II, Src: QaCafe_dc:14:fd (b0:75:0c:dc:14:fd), Dst: Broadcast (ff:ff:ff:ff:ff:ff)",
                        "value": "",
                        "size": "14",
                        "fields": [
                            {
                                "name": "eth.dst",
                                "show_name": "Destination: Broadcast (ff:ff:ff:ff:ff:ff)",
                                "size": "6",
                                "pos": "0",
                                "show": "ff:ff:ff:ff:ff:ff",
                                "fields": [
                                    {
                                        "name": "eth.dst_resolved",
                                        "show_name": "Destination (resolved): Broadcast",
                                        "size": "6",
                                        "pos": "0",
                                        "show": "Broadcast",
                                        "fields": null
                                    },
                                    {
                                        "name": "eth.addr",
                                        "show_name": "Address: Broadcast (ff:ff:ff:ff:ff:ff)",
                                        "size": "6",
                                        "pos": "0",
                                        "show": "ff:ff:ff:ff:ff:ff",
                                        "fields": null
                                    },
                                    {
                                        "name": "eth.addr_resolved",
                                        "show_name": "Address (resolved): Broadcast",
                                        "size": "6",
                                        "pos": "0",
                                        "show": "Broadcast",
                                        "fields": null
                                    },
                                    {
                                        "name": "eth.lg",
                                        "show_name": ".... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)",
                                        "size": "3",
                                        "pos": "0",
                                        "show": "1",
                                        "fields": null
                                    },
                                    {
                                        "name": "eth.ig",
                                        "show_name": ".... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)",
                                        "size": "3",
                                        "pos": "0",
                                        "show": "1",
                                        "fields": null
                                    }
                                ]
                            },
                            {
                                "name": "eth.src",
                                "show_name": "Source: QaCafe_dc:14:fd (b0:75:0c:dc:14:fd)",
                                "size": "6",
                                "pos": "6",
                                "show": "b0:75:0c:dc:14:fd",
                                "fields": [
                                    {
                                        "name": "eth.src_resolved",
                                        "show_name": "Source (resolved): QaCafe_dc:14:fd",
                                        "size": "6",
                                        "pos": "6",
                                        "show": "QaCafe_dc:14:fd",
                                        "fields": null
                                    },
                                    {
                                        "name": "eth.addr",
                                        "show_name": "Address: QaCafe_dc:14:fd (b0:75:0c:dc:14:fd)",
                                        "size": "6",
                                        "pos": "6",
                                        "show": "b0:75:0c:dc:14:fd",
                                        "fields": null
                                    },
                                    {
                                        "name": "eth.addr_resolved",
                                        "show_name": "Address (resolved): QaCafe_dc:14:fd",
                                        "size": "6",
                                        "pos": "6",
                                        "show": "QaCafe_dc:14:fd",
                                        "fields": null
                                    },
                                    {
                                        "name": "eth.lg",
                                        "show_name": ".... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)",
                                        "size": "3",
                                        "pos": "6",
                                        "show": "0",
                                        "fields": null
                                    },
                                    {
                                        "name": "eth.ig",
                                        "show_name": ".... ...0 .... .... .... .... = IG bit: Individual address (unicast)",
                                        "size": "3",
                                        "pos": "6",
                                        "show": "0",
                                        "fields": null
                                    }
                                ]
                            },
                            {
                                "name": "eth.type",
                                "show_name": "Type: ARP (0x0806)",
                                "size": "2",
                                "pos": "12",
                                "show": "2054",
                                "fields": null
                            }
                        ]
                    },
                    {
                        "name": "arp",
                        "pos": "14",
                        "show": "",
                        "show_name": "Address Resolution Protocol (request)",
                        "value": "",
                        "size": "28",
                        "fields": [
                            {
                                "name": "arp.hw.type",
                                "show_name": "Hardware type: Ethernet (1)",
                                "size": "2",
                                "pos": "14",
                                "show": "1",
                                "fields": null
                            },
                            {
                                "name": "arp.proto.type",
                                "show_name": "Protocol type: IP (0x0800)",
                                "size": "2",
                                "pos": "16",
                                "show": "2048",
                                "fields": null
                            },
                            {
                                "name": "arp.hw.size",
                                "show_name": "Hardware size: 6",
                                "size": "1",
                                "pos": "18",
                                "show": "6",
                                "fields": null
                            },
                            {
                                "name": "arp.proto.size",
                                "show_name": "Protocol size: 4",
                                "size": "1",
                                "pos": "19",
                                "show": "4",
                                "fields": null
                            },
                            {
                                "name": "arp.opcode",
                                "show_name": "Opcode: request (1)",
                                "size": "2",
                                "pos": "20",
                                "show": "1",
                                "fields": null
                            },
                            {
                                "name": "arp.src.hw_mac",
                                "show_name": "Sender MAC address: QaCafe_dc:14:fd (b0:75:0c:dc:14:fd)",
                                "size": "6",
                                "pos": "22",
                                "show": "b0:75:0c:dc:14:fd",
                                "fields": null
                            },
                            {
                                "name": "arp.src.proto_ipv4",
                                "show_name": "Sender IP address: 192.168.1.2 (192.168.1.2)",
                                "size": "4",
                                "pos": "28",
                                "show": "192.168.1.2",
                                "fields": null
                            },
                            {
                                "name": "arp.dst.hw_mac",
                                "show_name": "Target MAC address: 00:00:00_00:00:00 (00:00:00:00:00:00)",
                                "size": "6",
                                "pos": "32",
                                "show": "00:00:00:00:00:00",
                                "fields": null
                            },
                            {
                                "name": "arp.dst.proto_ipv4",
                                "show_name": "Target IP address: 192.168.1.1 (192.168.1.1)",
                                "size": "4",
                                "pos": "38",
                                "show": "192.168.1.1",
                                "fields": null
                            }
                        ]
                    }
                ]
            }
        ]
    }
}

Get a capture’s ASCII

Get a capture’s ASCII (hex dump).

GET /api/v1/results/{id}/tests/{seq}/captures/{intf}/ascii

URL Parameters

Name Description
filter string (optional) A PCAP display filter to apply to the capture file
frame integer (optional) If given, only return specified frame
inline boolean (optional) If true, use “master” (-m.cap) capture file

Response 200 OK

{
    "timestamp": "2016-04-15T15:48:21.810730879-04:00",
    "data": {
        "frame": {
            "lines": [
                {
                    "raw": "0000  ff ff ff ff ff ff b0 75 0c dc 14 fd 08 06 00 01   .......u........",
                    "offset": "0000",
                    "ascii": [
                        { "byte": ".", "pos": 0 },
                        { "byte": ".", "pos": 1 },
                        { "byte": ".", "pos": 2 },
                        { "byte": ".", "pos": 3 },
                        { "byte": ".", "pos": 4 },
                        { "byte": ".", "pos": 5 },
                        { "byte": ".", "pos": 6 },
                        { "byte": "u", "pos": 7 },
                        { "byte": ".", "pos": 8 },
                        { "byte": ".", "pos": 9 },
                        { "byte": ".", "pos": 10 },
                        { "byte": ".", "pos": 11 },
                        { "byte": ".", "pos": 12 },
                        { "byte": ".", "pos": 13 },
                        { "byte": ".", "pos": 14 },
                        { "byte": ".", "pos": 15 }
                    ],
                    "hex": [
                        { "byte": "ff", "pos": 0 },
                        { "byte": "ff", "pos": 1 },
                        { "byte": "ff", "pos": 2 },
                        { "byte": "ff", "pos": 3 },
                        { "byte": "ff", "pos": 4 },
                        { "byte": "ff", "pos": 5 },
                        { "byte": "b0", "pos": 6 },
                        { "byte": "75", "pos": 7 },
                        { "byte": "0c", "pos": 8 },
                        { "byte": "dc", "pos": 9 },
                        { "byte": "14", "pos": 10 },
                        { "byte": "fd", "pos": 11 },
                        { "byte": "08", "pos": 12 },
                        { "byte": "06", "pos": 13 },
                        { "byte": "00", "pos": 14 },
                        { "byte": "01", "pos": 15 }
                    ]
                },
                {
                    "raw": "0010  08 00 06 04 00 01 b0 75 0c dc 14 fd c0 a8 01 02   .......u........",
                    "offset": "0010",
                    "ascii": [
                        { "byte": ".", "pos": 16 },
                        { "byte": ".", "pos": 17 },
                        { "byte": ".", "pos": 18 },
                        { "byte": ".", "pos": 19 },
                        { "byte": ".", "pos": 20 },
                        { "byte": ".", "pos": 21 },
                        { "byte": ".", "pos": 22 },
                        { "byte": "u", "pos": 23 },
                        { "byte": ".", "pos": 24 },
                        { "byte": ".", "pos": 25 },
                        { "byte": ".", "pos": 26 },
                        { "byte": ".", "pos": 27 },
                        { "byte": ".", "pos": 28 },
                        { "byte": ".", "pos": 29 },
                        { "byte": ".", "pos": 30 },
                        { "byte": ".", "pos": 31 }
                    ],
                    "hex": [
                        { "byte": "08", "pos": 16 },
                        { "byte": "00", "pos": 17 },
                        { "byte": "06", "pos": 18 },
                        { "byte": "04", "pos": 19 },
                        { "byte": "00", "pos": 20 },
                        { "byte": "01", "pos": 21 },
                        { "byte": "b0", "pos": 22 },
                        { "byte": "75", "pos": 23 },
                        { "byte": "0c", "pos": 24 },
                        { "byte": "dc", "pos": 25 },
                        { "byte": "14", "pos": 26 },
                        { "byte": "fd", "pos": 27 },
                        { "byte": "c0", "pos": 28 },
                        { "byte": "a8", "pos": 29 },
                        { "byte": "01", "pos": 30 },
                        { "byte": "02", "pos": 31 }
                    ]
                },
                {
                    "raw": "0020  00 00 00 00 00 00 c0 a8 01 01                     ..........",
                    "offset": "0020",
                    "ascii": [
                        { "byte": ".", "pos": 32 },
                        { "byte": ".", "pos": 33 },
                        { "byte": ".", "pos": 34 },
                        { "byte": ".", "pos": 35 },
                        { "byte": ".", "pos": 36 },
                        { "byte": ".", "pos": 37 },
                        { "byte": ".", "pos": 38 },
                        { "byte": ".", "pos": 39 },
                        { "byte": ".", "pos": 40 },
                        { "byte": ".", "pos": 41 }
                    ],
                    "hex": [
                        { "byte": "00", "pos": 32 },
                        { "byte": "00", "pos": 33 },
                        { "byte": "00", "pos": 34 },
                        { "byte": "00", "pos": 35 },
                        { "byte": "00", "pos": 36 },
                        { "byte": "00", "pos": 37 },
                        { "byte": "c0", "pos": 38 },
                        { "byte": "a8", "pos": 39 },
                        { "byte": "01", "pos": 40 },
                        { "byte": "01", "pos": 41 }
                    ]
                }
            ]
        }
    }
}

Send a capture to CloudShark Appliance

Send a capture to a CloudShark Appliance. Both cloudshark_appliance_url and cloudshark_appliance_token must be properly configured via system preferences.

POST /api/v1/results/{id}/tests/{seq}/captures/{intf}/cloudshark

URL Parameters

Name Description
inline boolean (optional) If true, use “master” (-m.cap) capture file

Response 200 OK

{
    "timestamp": "2016-04-15T15:48:21.540765659-04:00",
    "data": {
        "url": "https://url.to.appliance/captures/deadbeef"
    }
}