Skip to content
Start here

PCAPs

List packet capture requests
magic_transit.pcaps.list(PCAPListParams**kwargs) -> SyncSinglePage[PCAPListResponse]
GET/accounts/{account_id}/pcaps
Get PCAP request
magic_transit.pcaps.get(strpcap_id, PCAPGetParams**kwargs) -> PCAPGetResponse
GET/accounts/{account_id}/pcaps/{pcap_id}
Create PCAP request
magic_transit.pcaps.create(PCAPCreateParams**kwargs) -> PCAPCreateResponse
POST/accounts/{account_id}/pcaps
Stop full PCAP
magic_transit.pcaps.stop(strpcap_id, PCAPStopParams**kwargs)
PUT/accounts/{account_id}/pcaps/{pcap_id}/stop
ModelsExpand Collapse
class PCAP:
id: Optional[str]

The ID for the packet capture.

maxLength32
minLength32
filter_v1: Optional[PCAPFilter]

The packet capture filter. When this field is empty, all packets are captured.

offset_time: Optional[datetime]

The RFC 3339 offset timestamp from which to query backwards for packets. Must be within the last 24h. When this field is empty, defaults to time of request.

formatdate-time
status: Optional[Literal["unknown", "success", "pending", 5 more]]

The status of the packet capture request.

One of the following:
"unknown"
"success"
"pending"
"running"
"conversion_pending"
"conversion_running"
"complete"
"failed"
submitted: Optional[str]

The RFC 3339 timestamp when the packet capture was created.

system: Optional[Literal["magic-transit"]]

The system used to collect packet captures.

time_limit: Optional[float]

The packet capture duration in seconds.

maximum300
minimum1
type: Optional[Literal["simple", "full"]]

The type of packet capture. Simple captures sampled packets, and full captures entire payloads and non-sampled packets.

One of the following:
"simple"
"full"
class PCAPFilter:

The packet capture filter. When this field is empty, all packets are captured.

destination_address: Optional[str]

The destination IP address of the packet.

destination_port: Optional[float]

The destination port of the packet.

protocol: Optional[float]

The protocol number of the packet.

source_address: Optional[str]

The source IP address of the packet.

source_port: Optional[float]

The source port of the packet.

One of the following:
class PCAP:
id: Optional[str]

The ID for the packet capture.

maxLength32
minLength32
filter_v1: Optional[PCAPFilter]

The packet capture filter. When this field is empty, all packets are captured.

offset_time: Optional[datetime]

The RFC 3339 offset timestamp from which to query backwards for packets. Must be within the last 24h. When this field is empty, defaults to time of request.

formatdate-time
status: Optional[Literal["unknown", "success", "pending", 5 more]]

The status of the packet capture request.

One of the following:
"unknown"
"success"
"pending"
"running"
"conversion_pending"
"conversion_running"
"complete"
"failed"
submitted: Optional[str]

The RFC 3339 timestamp when the packet capture was created.

system: Optional[Literal["magic-transit"]]

The system used to collect packet captures.

time_limit: Optional[float]

The packet capture duration in seconds.

maximum300
minimum1
type: Optional[Literal["simple", "full"]]

The type of packet capture. Simple captures sampled packets, and full captures entire payloads and non-sampled packets.

One of the following:
"simple"
"full"
class MagicVisibilityPCAPsPCAPsResponseFull:
id: Optional[str]

The ID for the packet capture.

maxLength32
minLength32
byte_limit: Optional[float]

The maximum number of bytes to capture. This field only applies to full packet captures.

maximum1000000000
minimum1
colo_name: Optional[str]

The name of the data center used for the packet capture. This can be a specific colo (ord02) or a multi-colo name (ORD). This field only applies to full packet captures.

destination_conf: Optional[str]

The full URI for the bucket. This field only applies to full packet captures.

error_message: Optional[str]

An error message that describes why the packet capture failed. This field only applies to full packet captures.

filter_v1: Optional[PCAPFilter]

The packet capture filter. When this field is empty, all packets are captured.

packets_captured: Optional[int]

The number of packets captured.

status: Optional[Literal["unknown", "success", "pending", 5 more]]

The status of the packet capture request.

One of the following:
"unknown"
"success"
"pending"
"running"
"conversion_pending"
"conversion_running"
"complete"
"failed"
stop_requested: Optional[datetime]

The RFC 3339 timestamp when stopping the packet capture was requested. This field only applies to full packet captures.

formatdate-time
submitted: Optional[str]

The RFC 3339 timestamp when the packet capture was created.

system: Optional[Literal["magic-transit"]]

The system used to collect packet captures.

time_limit: Optional[float]

The packet capture duration in seconds.

maximum86400
minimum1
type: Optional[Literal["simple", "full"]]

The type of packet capture. Simple captures sampled packets, and full captures entire payloads and non-sampled packets.

One of the following:
"simple"
"full"
One of the following:
class PCAP:
id: Optional[str]

The ID for the packet capture.

maxLength32
minLength32
filter_v1: Optional[PCAPFilter]

The packet capture filter. When this field is empty, all packets are captured.

offset_time: Optional[datetime]

The RFC 3339 offset timestamp from which to query backwards for packets. Must be within the last 24h. When this field is empty, defaults to time of request.

formatdate-time
status: Optional[Literal["unknown", "success", "pending", 5 more]]

The status of the packet capture request.

One of the following:
"unknown"
"success"
"pending"
"running"
"conversion_pending"
"conversion_running"
"complete"
"failed"
submitted: Optional[str]

The RFC 3339 timestamp when the packet capture was created.

system: Optional[Literal["magic-transit"]]

The system used to collect packet captures.

time_limit: Optional[float]

The packet capture duration in seconds.

maximum300
minimum1
type: Optional[Literal["simple", "full"]]

The type of packet capture. Simple captures sampled packets, and full captures entire payloads and non-sampled packets.

One of the following:
"simple"
"full"
class MagicVisibilityPCAPsPCAPsResponseFull:
id: Optional[str]

The ID for the packet capture.

maxLength32
minLength32
byte_limit: Optional[float]

The maximum number of bytes to capture. This field only applies to full packet captures.

maximum1000000000
minimum1
colo_name: Optional[str]

The name of the data center used for the packet capture. This can be a specific colo (ord02) or a multi-colo name (ORD). This field only applies to full packet captures.

destination_conf: Optional[str]

The full URI for the bucket. This field only applies to full packet captures.

error_message: Optional[str]

An error message that describes why the packet capture failed. This field only applies to full packet captures.

filter_v1: Optional[PCAPFilter]

The packet capture filter. When this field is empty, all packets are captured.

packets_captured: Optional[int]

The number of packets captured.

status: Optional[Literal["unknown", "success", "pending", 5 more]]

The status of the packet capture request.

One of the following:
"unknown"
"success"
"pending"
"running"
"conversion_pending"
"conversion_running"
"complete"
"failed"
stop_requested: Optional[datetime]

The RFC 3339 timestamp when stopping the packet capture was requested. This field only applies to full packet captures.

formatdate-time
submitted: Optional[str]

The RFC 3339 timestamp when the packet capture was created.

system: Optional[Literal["magic-transit"]]

The system used to collect packet captures.

time_limit: Optional[float]

The packet capture duration in seconds.

maximum86400
minimum1
type: Optional[Literal["simple", "full"]]

The type of packet capture. Simple captures sampled packets, and full captures entire payloads and non-sampled packets.

One of the following:
"simple"
"full"
One of the following:
class PCAP:
id: Optional[str]

The ID for the packet capture.

maxLength32
minLength32
filter_v1: Optional[PCAPFilter]

The packet capture filter. When this field is empty, all packets are captured.

offset_time: Optional[datetime]

The RFC 3339 offset timestamp from which to query backwards for packets. Must be within the last 24h. When this field is empty, defaults to time of request.

formatdate-time
status: Optional[Literal["unknown", "success", "pending", 5 more]]

The status of the packet capture request.

One of the following:
"unknown"
"success"
"pending"
"running"
"conversion_pending"
"conversion_running"
"complete"
"failed"
submitted: Optional[str]

The RFC 3339 timestamp when the packet capture was created.

system: Optional[Literal["magic-transit"]]

The system used to collect packet captures.

time_limit: Optional[float]

The packet capture duration in seconds.

maximum300
minimum1
type: Optional[Literal["simple", "full"]]

The type of packet capture. Simple captures sampled packets, and full captures entire payloads and non-sampled packets.

One of the following:
"simple"
"full"
class MagicVisibilityPCAPsPCAPsResponseFull:
id: Optional[str]

The ID for the packet capture.

maxLength32
minLength32
byte_limit: Optional[float]

The maximum number of bytes to capture. This field only applies to full packet captures.

maximum1000000000
minimum1
colo_name: Optional[str]

The name of the data center used for the packet capture. This can be a specific colo (ord02) or a multi-colo name (ORD). This field only applies to full packet captures.

destination_conf: Optional[str]

The full URI for the bucket. This field only applies to full packet captures.

error_message: Optional[str]

An error message that describes why the packet capture failed. This field only applies to full packet captures.

filter_v1: Optional[PCAPFilter]

The packet capture filter. When this field is empty, all packets are captured.

packets_captured: Optional[int]

The number of packets captured.

status: Optional[Literal["unknown", "success", "pending", 5 more]]

The status of the packet capture request.

One of the following:
"unknown"
"success"
"pending"
"running"
"conversion_pending"
"conversion_running"
"complete"
"failed"
stop_requested: Optional[datetime]

The RFC 3339 timestamp when stopping the packet capture was requested. This field only applies to full packet captures.

formatdate-time
submitted: Optional[str]

The RFC 3339 timestamp when the packet capture was created.

system: Optional[Literal["magic-transit"]]

The system used to collect packet captures.

time_limit: Optional[float]

The packet capture duration in seconds.

maximum86400
minimum1
type: Optional[Literal["simple", "full"]]

The type of packet capture. Simple captures sampled packets, and full captures entire payloads and non-sampled packets.

One of the following:
"simple"
"full"

PCAPsOwnership

List PCAPs Bucket Ownership
magic_transit.pcaps.ownership.get(OwnershipGetParams**kwargs) -> SyncSinglePage[Ownership]
GET/accounts/{account_id}/pcaps/ownership
Add buckets for full packet captures
magic_transit.pcaps.ownership.create(OwnershipCreateParams**kwargs) -> Ownership
POST/accounts/{account_id}/pcaps/ownership
Delete buckets for full packet captures
magic_transit.pcaps.ownership.delete(strownership_id, OwnershipDeleteParams**kwargs)
DELETE/accounts/{account_id}/pcaps/ownership/{ownership_id}
Validate buckets for full packet captures
magic_transit.pcaps.ownership.validate(OwnershipValidateParams**kwargs) -> Ownership
POST/accounts/{account_id}/pcaps/ownership/validate
ModelsExpand Collapse
class Ownership:
id: str

The bucket ID associated with the packet captures API.

maxLength32
minLength32
destination_conf: str

The full URI for the bucket. This field only applies to full packet captures.

filename: str

The ownership challenge filename stored in the bucket.

status: Literal["pending", "success", "failed"]

The status of the ownership challenge. Can be pending, success or failed.

One of the following:
"pending"
"success"
"failed"
submitted: str

The RFC 3339 timestamp when the bucket was added to packet captures API.

validated: Optional[str]

The RFC 3339 timestamp when the bucket was validated.

PCAPsDownload

Download Simple PCAP
magic_transit.pcaps.download.get(strpcap_id, DownloadGetParams**kwargs) -> BinaryResponseContent
GET/accounts/{account_id}/pcaps/{pcap_id}/download