Merge

The merge API call can be used to merge multiple captures into a single capture. Captures are merged based on each packets timestamp and duplicate packets can optionally be removed.

In order to merge captures, the API Token must have permission to upload capture files.

Usage

POST /api/v1/<token>/merge?capture_ids=<comma separated list of captures>

The merge call can be invoked by sending an http or https POST request to the CloudShark system using a valid API token and a list of CloudShark capture session ids.

Response

The method returns the id of the newly created capture session and the filename of the new file or what error prevented the files from being merged.

{
  "id": "134dfab05050",
  "filename": "merged 54c80de81b68-d3fa8e7dc9f2"
}

The session id can be used to build a URL directly to the newly merged capture session.

https://www.cloudshark.org/captures/134dfab05050

Additional Parameters

Optional parameters can be set when the captures are merged via the API:

  • additional_tags - a comma-separated list of tags to apply to the capture file
  • filename - specify the filename of the capture in CloudShark
  • duplicates - set to remove to eliminate duplicate packets

Example

curl -X POST
https://www.cloudshark.org/api/v1/5074c96532320d83f0ad8c4029fb83b7/merge?capture_ids=d04a51beadb2,1ee74d128ada

{
   "id" : "03f54fa18e94",
   "filename" : "merged d04a51beadb2-d04a51beadb2"
}