FAQ Blog Upload Pricing View PCAPs My PCAPs 🔒 Sign In

How to upload a pcap file with a REST API Key

Uploading a pcap File Using a REST API Key: A Guide for Professional and Business Plan Subscribers.

If you're a subscriber to our Professional or Business plan, you have the exclusive capability to upload pcap files through our REST API Key. Here's a step-by-step breakdown of the process:

  1. Subscription Requirement : This feature is accessible only to customers who have opted for the Professional or Business plan.
  2. Locating Your REST API Key: To begin, log in to your account and navigate to your profile. If you have a Professional subscription or higher, you'll find your REST API Key here. You have the option to either reveal your existing key by clicking "Show," or you can choose to generate a new one by clicking "Generate" if needed.
  3. Key Functionality: The REST API Key is pivotal for enabling this feature. It not only authenticates your access but also carries over the features and limitations of your account. This means that any constraints you've set, such as limiting the number of files or the file sizes, will also be applicable when utilizing the key for file uploads.

Remember, the ability to upload pcap files via the REST API Key provides a streamlined and efficient way for Professional and Business plan subscribers to manage and utilize their account features.

REST API key in user profile

Upload a pcap file

Execute the following command to enqueue a file for processing:

curl -X POST -H "Authorization: Bearer <REST API Key>" -F file=@<path to pcap file> https://apackets.com/api/v1/upload/private/

Upon completing the upload, the upload service will issue a response containing the pcap UUID. This UUID serves as a unique identifier for future referencing.:

{"name":"<pcap file name>","uuid":"<pcap UUID>"}

Processing status

While the file is undergoing processing, you can monitor its status by utilizing the pcap UUID obtained in the previous step.

curl -H "Authorization: Bearer <REST API Key>" https://apackets.com/api/v1/pcaps/private/status/<pcap UUID>

Once the pcap processing has concluded, the request will furnish a response.

{"status": "ok"}
{"status": "processing"}

Once the processing is finalized, you can conveniently navigate to and oversee the managed files in your profile through the following link: https://apackets.com/my

Usage info

To assess your subscription limits and review your current usage, execute the following command:

curl -H "Authorization: Bearer <REST API Key>" https://apackets.com/api/v1/pcaps/private/user/limits

Here's an exemplar of the output:

    "currentFilesCount": 2,
    "filesLimit": 500,
    "maxFileSize": 104857600