Export My Data

POST /v1/user/data-export

Export every data category attached to the calling user — endpoints, tunnels, domains, traffic policies, billing records, audit logs, support tickets — as a single JSON file. Useful for GDPR data-portability requests and personal backups.

Unlike most POST endpoints, this streams the export inline as a JSON download (Content-Type: application/json, Content-Disposition: attachment); there's no async queue. Large accounts may take several seconds to assemble. Individual sections that fail to load are logged server-side and skipped — the export always completes with whatever data was readable.

Request body

None — pass {} or omit the body entirely. The export covers the authenticated user.

Response (200 OK)

JSON document, returned as a streaming download. Top-level keys:

exported_at datetime
RFC 3339 UTC timestamp of when the export was generated.
user object
User profile — same shape as /user.
endpoints array
All endpoints owned by the user.
tunnels array
Historical tunnel records (live tunnels are ephemeral; this captures their last known state).
domains, traffic_policies, firewall_policies, certificates, dns_records array
Per-resource collections owned by the user.
api_keys, auth_tokens array
Metadata only — the actual key values are never included (would defeat the purpose of one-time secrets).
audit_logs array
Authentication events, profile changes, admin actions affecting the user.
errors array
List of section names that failed to load. Empty on a clean export.

Errors

401 Unauthorized
Missing auth.
500
Top-level encoding error. Section-level failures don't fail the request — they just appear in the errors array.
Request
curl -X POST "https://api.ngris.com/v1/user/data-export" \ -H "X-API-KEY: <your_api_key>" \ -o my-ngris-export.json
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") data = client._post_raw("/user/data-export", {}) import json with open("export.json", "w") as f: json.dump(data, f, indent=2)
Response — 200 OK (excerpt)
{ "exported_at": "2026-04-29T13:00:00Z", "user": {"id": 1024, "username": "alice", "email": "alice@example.com"}, "endpoints": [ {"uuid": "abc-123", "subdomain": "myapp", "protocol": "http"} ], "domains": [], "audit_logs": [ {"event": "login", "ip": "1.2.3.4", "timestamp": "2026-04-29T08:15:00Z"} ], "errors": [] }
On this page
Export My Data
Iris