---
title: "Export hosts with children to ZIP"
method: GET
path: "/api/v1/hosts/export/zip"
tags: ["Hosts"]
---

# Export hosts with children to ZIP

`GET /api/v1/hosts/export/zip`

Exports all hosts matching the filter criteria along with their children
(ip_addresses, ports, services, interfaces) as a ZIP archive containing
separate CSV files for each entity type.

## Query parameters

- `network_id` string, uuid, nullable
- `ids` string[], nullable
- `tag_ids` string[], nullable
- `search` string, nullable
- `group_by` 'created_at' | 'name' | 'hostname' | 'updated_at' | 'virtualized_by' | 'network_id' | 'interface_ip' | 'last_seen_at' — Fields that hosts can be ordered/grouped by.
- `order_by` 'created_at' | 'name' | 'hostname' | 'updated_at' | 'virtualized_by' | 'network_id' | 'interface_ip' | 'last_seen_at' — Fields that hosts can be ordered/grouped by.
- `order_direction` 'asc' | 'desc' — Direction for ORDER BY clauses.
- `limit` integer, nullable
- `offset` integer, nullable
- `at` string, date-time, nullable
- `stale` boolean, nullable
- `include_children` boolean, nullable

## Response `200`

ZIP file containing CSVs

---

[API](https://skmtc.net/scanopy/apis/scanopy-api.md) · [All operations](https://skmtc.net/scanopy/apis/scanopy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scanopy/scanopy-api/revisions/2df1fc47dfa7/schema)
