28
edits
(→Pcap upload and analysis: use --json in curl POST commands) |
(→Pcap upload and analysis: use Content-Type header instead of --json (which is only available in curl 7.82+)) |
||
Line 281: | Line 281: | ||
<pre> | <pre> | ||
curl -k -u USER:PASSWORD "https://allegro-mm/API/system/replay/upload" --json '{"fileName": "abc.pcapng", "fileSize": '$(stat -c %s abc.pcapng)', "replaySlotID": 1, "forceSlotID": true, "useReplayBuffer": true}' | curl -k -u USER:PASSWORD "https://allegro-mm/API/system/replay/upload" --header "Content-Type: application/json" -d '{"fileName": "abc.pcapng", "fileSize": '$(stat -c %s abc.pcapng)', "replaySlotID": 1, "forceSlotID": true, "useReplayBuffer": true}' | ||
curl -k -u USER:PASSWORD "https://allegro-mm/API/data/pcap?mm-id=:1" --json '{"command":"start"}' | curl -k -u USER:PASSWORD "https://allegro-mm/API/data/pcap?mm-id=:1" --header "Content-Type: application/json" -d '{"command":"start"}' | ||
curl -F 'name=file' -F 'filename=abc.pcapng' -F 'file=@path_to/abc.pcapng' -k -u USER:PASSWORD "https://allegro-mm/API/system/analyze-pcap?replaySlotID=1" | curl -F 'name=file' -F 'filename=abc.pcapng' -F 'file=@path_to/abc.pcapng' -k -u USER:PASSWORD "https://allegro-mm/API/system/analyze-pcap?replaySlotID=1" | ||
</pre> | </pre> |
edits