{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Create new PCAP request for account.","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/magic-visibility-pcaps_identifier"}},"required":["account_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_request_pcap"}},"required":["path","body"],"additionalProperties":false,"definitions":{"magic-visibility-pcaps_identifier":{"description":"Identifier.","type":"string","maxLength":32,"examples":["023e105f4ecef8ad9ca31a8372d0c353"]},"magic-visibility-pcaps_pcaps_request_pcap":{"anyOf":[{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_request_simple"},{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_request_full"}]},"magic-visibility-pcaps_pcaps_request_simple":{"type":"object","properties":{"filter_v1":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_filter_v1"},"offset_time":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_offset_time"},"packet_limit":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_packet_limit"},"system":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_system"},"time_limit":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_time_limit_sampled"},"type":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_type"}},"required":["time_limit","packet_limit","type","system"]},"magic-visibility-pcaps_pcaps_request_full":{"type":"object","properties":{"byte_limit":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_byte_limit"},"colo_name":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_colo_name"},"destination_conf":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_destination_conf"},"filter_v1":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_filter_v1"},"packet_limit":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_packet_limit"},"system":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_system"},"time_limit":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_time_limit_full"},"type":{"$ref":"#/definitions/magic-visibility-pcaps_pcaps_type"}},"required":["time_limit","type","system","colo_name","destination_conf"]},"magic-visibility-pcaps_pcaps_filter_v1":{"description":"The packet capture filter. When this field is empty, all packets are captured.","type":"object","properties":{"destination_address":{"description":"The destination IP address of the packet.","type":"string","examples":["1.2.3.4"]},"destination_port":{"description":"The destination port of the packet.","type":"number","examples":[80]},"protocol":{"description":"The protocol number of the packet.","type":"number","examples":[6]},"source_address":{"description":"The source IP address of the packet.","type":"string","examples":["1.2.3.4"]},"source_port":{"description":"The source port of the packet.","type":"number","examples":[123]}}},"magic-visibility-pcaps_pcaps_offset_time":{"description":"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.","type":"string","format":"date-time","examples":["2020-01-01T08:00:00Z"]},"magic-visibility-pcaps_pcaps_packet_limit":{"description":"The limit of packets contained in a packet capture.","type":"number","maximum":10000,"minimum":1,"examples":[10000]},"magic-visibility-pcaps_pcaps_system":{"description":"The system used to collect packet captures.","type":"string","enum":["magic-transit"],"examples":["magic-transit"]},"magic-visibility-pcaps_pcaps_time_limit_sampled":{"description":"The packet capture duration in seconds.","type":"number","maximum":300,"minimum":1,"examples":[300]},"magic-visibility-pcaps_pcaps_type":{"description":"The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.","type":"string","enum":["simple","full"],"examples":["simple"]},"magic-visibility-pcaps_pcaps_byte_limit":{"description":"The maximum number of bytes to capture. This field only applies to `full` packet captures.","type":"number","maximum":1000000000,"minimum":1,"examples":[500000]},"magic-visibility-pcaps_pcaps_colo_name":{"description":"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.","type":"string","examples":["ord02"]},"magic-visibility-pcaps_pcaps_destination_conf":{"description":"The full URI for the bucket. This field only applies to `full` packet captures.","type":"string","examples":["s3://pcaps-bucket?region=us-east-1"]},"magic-visibility-pcaps_pcaps_time_limit_full":{"description":"The packet capture duration in seconds.","type":"number","maximum":86400,"minimum":1,"examples":[86400]}}},"name":"Create PCAP request","id":"cloudflare.magic-pcap-collection-create-pcap-request","example":{"path":{"account_id":"023e105f4ecef8ad9ca31a8372d0c353"},"body":{"time_limit":300,"packet_limit":10000,"type":"simple","system":"magic-transit"}},"maxRequests":1,"summary":false}}