GET: Download Saved Trace
Use the NetMaster GET: Download Saved Trace API endpoint to download a saved SmartTrace in PCAP format.
GET: Download Saved Trace downloads a SmartTrace in LIBPCAP 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/saved/{id}/download
Parameter | Description |
region | The NetMaster region |
id | The ID of the trace. Enter the trace ID for a saved trace in the format tracename-n , where "n" is the number of a saved trace for a specific trace definition. |
Response Format
The response is in PCAP binary output.
Status Codes
The following status codes can appear in the response to the GET: Download Saved Trace Definitions:
- 200 OK- The saved trace was downloaded.
- 400 Bad Request- A saved 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 saved trace could not be downloaded because the user does not have the appropriate authority to view traces.
- 404 Not Found- A saved trace matching the URI parameters could not be located.
- 500Server error
Headers
There are two headers:
- Content-TypeThe Content-Type header is alwaysapplication/pcap. This format differs from other NetMaster APIs, where the Content-Type header is typicallyapplication/json.
- Content-DispositionThe Content-Disposition header is always set toattachment, 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
from the U22NDE55
NetMaster region: GET /api/v1/tcpip/U22NDE55/smart/saved/ATRACE-1/download
Sample Response: Single Trace Download
The following code shows a sample download for trace
ATRACE-1
from the U22NDE55
NetMaster region:
Content-Type: application/pcap Content-Disposition: attachment; filename="ATRACE-1.pcap" Content-Length: 12345RAW PCAP BINARY APPEARS HERE