get_network_har_file
Retrieves and filters HAR data from a Sauce Labs test job. Use predefined categories for common patterns or custom filters for detailed control.
Instructions
Retrieves and filters HAR file data from a Sauce Labs test job.
The tool can intelligently filter requests to reduce data size and focus analysis.
Use filter categories for common patterns, or specify custom filters for detailed control.
:param job_id: The Sauce Labs Job ID (works for VDC jobs with network capture enabled)
:param filter_category: Predefined filter categories:
- "analytics" - Google Analytics, Facebook Pixel, Adobe Analytics, Comscore, etc.
- "api" - Internal API calls (same domain as main site, JSON responses)
- "fonts" - Font loading requests (woff, woff2, ttf, etc.)
- "images" - Image resources (jpg, png, webp, svg, etc.)
- "scripts" - JavaScript files and external scripts
- "errors" - Failed requests (4xx, 5xx status codes)
- "slow" - Requests taking longer than 1 second
- "third-party" - All external domain requests
:param custom_domains: List of domain patterns to include (e.g., ["google", "facebook", "api.company.com"])
:param resource_types: List of resource types to include (e.g., ["Script", "XHR", "Image"])
:param status_codes: List of HTTP status codes to include (e.g., [200, 404, 500])
:return: Filtered HAR data structure with only matching requests
Examples:
- get_network_har_file(job_id, filter_category="analytics")
- get_network_har_file(job_id, filter_category="api")
- get_network_har_file(job_id, custom_domains=["retailmenot.com"], resource_types=["XHR"])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | ||
| filter_category | No | ||
| custom_domains | No | ||
| resource_types | No | ||
| status_codes | No |