# /systems/export - Export systems to CSV or PDF **GET /systems/export** Export systems with applied filters to CSV or PDF format. **Features:** - Supports all filter parameters from GET /systems - Maximum 10,000 systems per export (DoS protection) - CSV format: Simple spreadsheet with all fields - PDF format: Formatted report with metadata and filters applied - File naming: `systems_export_YYYY-MM-DD_HHmmss.[csv|pdf]` **Permissions**: Requires `read:systems` permission and respects RBAC hierarchy **Export Fields:** - Name, Type, Version, Status - FQDN, IPv4 Address, IPv6 Address - System Key, Notes - Created At - Organization Name, Organization Type - Created By Name, Created By Email, Created By Organization ## Servers - Backend API server: https://my.nethesis.it/backend/api (Backend API server) ## Authentication methods - Bearer auth ## Parameters ### Query parameters - **format** (string) Export format (csv or pdf) - **search** (string) Search term. For organizations (distributors, resellers, customers), searches across name, description, and all custom_data fields (vat, address, city, contact, email, phone, language, notes, etc.). For systems, also searches across ipv4_address and ipv6_address. - **sort_by** (string) Field to sort systems by - **sort_direction** (string) Sort direction - **name** (string) Filter systems by name (case-insensitive, partial match) - **system_key** (array[string]) Filter systems by system key (exact match). Supports multiple values, so it doubles as a batch lookup: `?system_key=KEY1&system_key=KEY2` returns exactly the requested systems (within the caller's RBAC scope). - **type** (array[string]) Filter systems by type/product (exact match). Supports multiple values for checkbox filtering. - **created_by** (array[string]) Filter systems by creator user ID or creator organization ID (exact match). Each provided ID is checked against both the user_id and organization_id fields of the system creator. Supports multiple values for checkbox filtering. Examples: - `?created_by=53h5zxpwu4vc` - matches systems created by user with ID 53h5zxpwu4vc - `?created_by=lbswt1rxdhbz` - matches systems created by users in organization lbswt1rxdhbz - `?created_by=53h5zxpwu4vc&created_by=lbswt1rxdhbz` - matches systems created by the user OR by users in the organization - **version** (array[string]) Filter systems by version using prefixed format `product:version` (e.g., `nsec:8.0`, `ns8:1.2.3`). The prefix prevents ambiguity when the same version number exists for multiple products. Supports multiple values for checkbox filtering. **Example**: `?version=nsec:8.0&version=ns8:1.2.3` matches systems with (nsec version 8.0) OR (ns8 version 1.2.3) **Backward compatibility**: Non-prefixed versions (e.g., `8.0`) are still supported but may match multiple products. - **organization_id** (array[string]) Filter systems by organization ID (exact match). Supports multiple values for checkbox filtering. - **include_hierarchy** (boolean) When true (and organization_id is provided), each organization_id is expanded to the organization plus all its descendants (a distributor's resellers and their customers, a reseller's customers) before filtering - **status** (array[string]) Filter systems by status. Supports multiple values. - unknown, active, inactive, deleted: match the system status column - suspended: virtual status matching systems with suspended_at IS NOT NULL - no_inventory: virtual status matching systems that have been in contact but never delivered an inventory (last_inventory_at IS NULL AND status <> 'unknown') Special value "deleted" shows soft-deleted systems (where deleted_at IS NOT NULL). When "deleted" is combined with other statuses, both deleted and non-deleted systems matching the other statuses are returned. "no_inventory" is additive rather than exclusive: such a system is also active or inactive, so it matches both filters. Selecting it alone yields exactly the systems flagged with the missing-inventory warning in the UI. The status field of the response never carries this value. - **addon** (array[string]) Filter systems by add-on. Supports multiple values: a system matches when it holds at least one of them (OR). Only grants valid at the time of the request count — an expired or revoked add-on is not one the system has. Use GET /api/filters/systems to populate the choices with the add-ons actually present in the caller's hierarchy. ## Responses ### 200 Export file generated successfully #### Headers - **Content-Disposition** (string) Attachment filename - **Content-Length** (integer) File size in bytes #### Body: text/csv (string(binary)) string(binary) ### 400 Bad request (invalid format or too many systems) #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object) ### 401 Unauthorized - invalid or missing token #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object | null) ### 403 Forbidden - insufficient permissions #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object | null) [Powered by Bump.sh](https://bump.sh)