GET: Download Trace

The NetMaster GET: Download Trace API endpoint downloads a SmartTrace in PCAP file format.
GET: Download Trace downloads a SmartTrace trace in PCAP file format. The following reference article includes:
  • Uniform Resource Identifier (URI) Parameters
  • Response Format
  • Status Codes
  • Headers
  • Sample Request and Response

URI Parameters

The URI for Get Download Trace is:
GET /api/v1/tcpip/{region}/smart/trace/{id}/download
Parameter
Description
region
The NetMaster region
id
The ID of the trace. The trace ID consists of a hyphenated string of key properties in the following format:
key.definitionName-key.generation-key.sequence-key.stackName-key.tcpCreatorSequence-key.snapshotSequence

Response Format

The response is in PCAP binary output.

Status Codes

The following status codes can appear in the response to the GET: All SmartTrace Definitions:
  • 200 OK
    - The trace was downloaded.
  • 400 Bad Request
    - A  trace could not be downloaded due to an invalid format for the URI query parameters.
  • 401 Unauthorized
    - The user is not authenticated to the application. They must provide either a valid login token or valid credentials before continuing.
  • 403 Forbidden
    - A list of traces could not be downloaded because the user does not have the appropriate authority to view traces.
  • 404 Not Found
    - A trace matching the URI parameters could not be located.
  • 500
    Server error

Headers

There are two headers:
  • Content-Type
    The Content-Type header is always
    application/pcap
    . This format differs from other NetMaster APIs, where the Content-Type header is typically
    application/json
    .
  • Content-Disposition
    The Content-Disposition header is always set to
    attachment
    , indicating that the browser should download the content. A default filename of the trace definition name is set.

Sample Requests and Responses

Sample Request: Single Trace Download
The following requests a download of the trace
ATRACE-1-4-0-0
from the
U22NDE55
NetMaster region:
GET /api/v1/tcpip/U22NDE55/smart/trace/ATRACE-1-4-TCPIP-0-0/download
Sample Response: Single Trace Download
The following code shows a sample download for trace
ATRACE-1-4-0-0
from the
U22NDE55
NetMaster region:
Content-Type: application/pcap Content-Disposition: attachment; filename="ATRACE-1-4-TCPIP-0-0.pcap" Content-Length: 12345
RAW PCAP BINARY APPEARS HERE