---
title: "Get a packet capture session"
method: GET
path: "/packetcaptures/{id}"
tags: ["Packet Capture"]
---

# Get a packet capture session

`GET /packetcaptures/{id}`

Get packet capture session by ID.

## Path parameters

- `id` integer, required

## Query parameters

- `fields` XiqPacketCaptureField[]

## Response `200`

OK

- XiqPacketCapture — This represents the packet capture session
  - `id` integer — The unique identifier
  - `start_time` string, date-time — The packet capture start time
  - `end_time` string, date-time — The packet capture end time
  - `org_id` integer — The organization identifier, valid when enabling HIQ feature
  - `name` string — The packet capture session name. If the name is null or empty, it will be auto generated.
  - `duration` integer — An integer containing the set packet capture duration in seconds, from 5 to a maximum of 604800 seconds (1 week). If duration is set to 0 or unspecified, capture stops when platform-maximum size is reached.
  - `capture_id_type` 'AP_SERIAL_NUMBER' | 'DEVICE_IDS' | 'LOCATION' — The capture identifier type for selecting the APs. Depending on the type, one of "ap_serial_number", "device_ids" and "location_id" must be provided.
  - `ap_serial_number` string — The globally unique serial number of the device being registered. The serial number is represented as a string.
  - `device_ids` integer[] — The device ID list.
  - `location_id` integer — The assigned location ID, it must be FLOOR type
  - `destination` 'CLOUD' | 'CLOUD_SHARK' — The destination for the packet capture files. CLOUD for XIQ cloud storage. CLOUD_SHARK for sending the capture files to CloudShark, in addition to XIQ cloud storage.
  - `filter` XiqCaptureFilter — The filter criteria for packet capture
    - `mac_addr` string[] — List of the client MAC addresses used for packet capturing
    - `ip_addr` string[] — List of the client IP addresses used to filter the packets
    - `protocol` 'ANY' | 'USER_DEFINED' | 'ICMP' | 'ICMPV6' | 'TCP' | 'UDP' | 'GRE' | 'IPSEC_ESP' | 'IPSEC_AH' — Protocol type to filter by
    - `protocol_number` integer — The protocol number if protocol is "USER_DEFINED"
    - `port` integer — The port for packet capture
    - `vlan` string — Specific vlan ids in a string, e.g. range "2-100"; single "3"; list "1,2,5,7,122"; mixed "2,4,5-10,19,29". If not specified, default is all VLANs.
    - `wlan` string — A WLAN SSID. If not specified, default is all WLANs.
  - `capture_if` XiqCaptureLocation — This represents the options for location packet capture.
    - `direction` 'BOTH' | 'OUT' | 'IN' — The capture traffic direction
    - `radio` 'ALL' | 'RADIO1' | 'RADIO2' | 'RADIO3' | 'RADIO4' — The wireless radio to capture. Set to ALL for all radios.
    - `wired_interface` 'ALL' | 'ETH0' | 'ETH1' | 'ETH2' | 'ETH3' — The name of the wired interface to capture. Set to ALL for all interfaces.
    - `wireless_band` 'ALL' | '2.4GHZ' | '5GHZ' | '6GHZ' — The wireless band to capture. Set to ALL for all bands.
    - `wired_filters` XiqWiredFilterType[] — The list of pre-defined wired filters for packet capture
    - `wireless_filters` XiqWirelessFilterType[] — The list of pre-defined wireless filters for packet capture
  - `status` 'INITIAL' | 'ACTIVE' | 'SUCCESS' | 'PARTIAL_SUCCESS' | 'FAILED' — The status of the packet capture result
  - `results` XiqCaptureResult[] — The list of packet capture results - a PacketCaptureResult for each device's interface
    - `id` integer — The unique identifier
    - `org_id` integer — The organization identifier, valid when enabling HIQ feature
    - `start_time` string, date-time — The packet capture start time
    - `end_time` string, date-time — The packet capture end time
    - `device_id` integer — The device identifier
    - `hostname` string — The device host name
    - `mac_address` string — The device MAC address
    - `interface_name` string — The interface name such as "WIFI0", "WIFI1", "ETH0", etc.
    - `location_id` integer — The location ID
    - `locations` XiqLocationLegend[] — The detailed location
      - `id` integer — The location ID
      - `name` string — The location name
    - `status` 'INITIAL' | 'ACTIVE' | 'SUCCESS' | 'PARTIAL_SUCCESS' | 'FAILED' — The status of the packet capture result
    - `error_message` string — The error message (may be empty).
    - `error_code` string — The error code (message key) identifying the type of error (may be empty).
    - `storage` XiqStorage — The packet capture file storage
      - `cloud_storage` string — XIQ cloud storage location after a packet capture is completed.
      - `cloud_shark_storage` XiqCloudSharkStorage — The packet capture file name and URL in CloudShark.
        - `file_name` string — File name in CloudShark
        - `file_url` string — File URL in CloudShark
  - `cloud_storage` string — XIQ cloud storage location for the archive of all capture files in this capture session, if available.

---

[API](https://skmtc.net/extremecloudiq/apis/extremecloud-iq-api.md) · [All operations](https://skmtc.net/extremecloudiq/apis/extremecloud-iq-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/extremecloudiq/extremecloud-iq-api/versions/5ff7ab84e8e8/schema)
