Sending Data
Sending Data
Send records to the full ingest endpoint copied from a source’s Ingest tab:
https://{region}.ingest.tailglow.io/{project_id}Include an ingest key as the endpoint requires. Do not substitute a generic ingest hostname for your project endpoint.
Check before uploading
Send a GET request to your complete ingest URL, including its key, to verify authentication and current readiness without sending records. A 200 OK response with status: "ready" confirms the key and destination are ready for an upload. See Verify the connection for examples and failure responses.
Upload with POST to the same address and wait for each request’s acknowledgement. Readiness can change after the check.
Upload a file in the app
Open Collections → Upload data to choose an existing collection or create one. From inside a collection, Upload data selects that collection for you. Choose an ingest key and an XML, JSONL, CSV, TSV, or JSON file. The app detects the format from a bounded content sample and previews the first records. A sampled preview does not validate the whole file or guarantee every field has been seen.
For XML, choosing the file is enough. The app automatically imports each entry directly inside the document’s root, including different entry types. Nested content stays together. Root attributes and meaningful text are retained in a separate document record; a document containing only its root becomes one record. Each XML record has name, attributes, and ordered children, with attribute values preserved as strings. Line-break indentation in element-only containers is removed; meaningful text, inline spaces, whitespace-only values, CDATA, character references and xml:space="preserve" are retained.
Advanced options lets you override the detected format or import only part of an XML file using a Custom XML path, such as /HealthData/Record. Paths use literal element names, including any namespace prefix, rather than XPath expressions. No path selection is required for a normal upload.
XML imports support UTF-8 XML 1.0 with predefined and numeric entities. Namespace names are preserved without resolving namespace URIs. DOCTYPE declarations are framed but not applied; external resources and declared entities are not loaded. HTML is not supported.
CSV and TSV require UTF-8 with unique, non-empty column headers. JSONL requires one JSON object per non-empty line. Whole-document JSON accepts an object or an array of objects, up to 50 MiB. Export Excel or Numbers spreadsheets as CSV first.
Streaming XML, JSONL, CSV and TSV have no total file-size cap in the picker. The browser reads bounded chunks and uploads batches of at most 500 records or 1 MiB. Each serialized record, including its newline, must fit within 1 MiB. Keep the tab open while importing. Large files still require time to read and send, and the destination’s normal ingest limits apply.
After the preview, choose Import records to start. Each record is checked before its batch is sent. You can optionally check the full file first to catch file errors before sending anything. A failed check prevents import; changing the format or XML path creates a new preview. The app also verifies the destination before sending records. If the destination check fails, fix it or choose another key, then select Check again.
Source dates stay in the records. Tailglow records when each batch arrives; views and charts can use a source date field instead, such as a historical start time.
The rows animate as the server acknowledges them. Stop import waits for the current request and sends no further batches. Upload requests are not retried automatically; a network failure can leave the last batch’s delivery uncertain. A late file error can also stop an import after some batches have arrived. The result reports accepted records and any affected batch range. Check delivery before starting another import, since repeating it can create duplicates. Accepted records may take a moment to appear in the collection.
Import a file with the CLI
The CLI requires Node 22 or newer. Scan and validate work locally without credentials:
tglow import scan ./export.xml
tglow import scan ./export.xml --record-path /HealthData/Record
tglow import validate ./export.xmlscan reports a bounded sample, schema, XML paths and possible timestamp fields. Add --full to scan to the end. XML uses the same automatic record selection as the app. validate reads the entire file. An optional --record-path narrows the import; XML outside that path is still checked for syntax errors. --format xml|jsonl|json|csv|tsv overrides automatic format detection.
Import into an explicit collection using the complete ingest URL and expected project:
tglow import ./export.xml
--ingest-url 'https://{region}.ingest.tailglow.io/{project_id}?key={ingest_key}'
--project '{project_id}'
--collection health_recordsTo import only Apple Health measurements, add --record-path /HealthData/Record. Without that filter, the file may also contain metadata and other record types. Each record keeps its own dates, such as startDate, for views and charts to use.
Alternatively, provide --project, --source-id and --ingest-key-id to resolve that exact key using your configured API credentials. No source or key is chosen automatically.
By default, upload previews a bounded sample and validates records as it sends batches. It reads through one open file descriptor and stops if it detects a change to the input. Do not edit the file during import. A late file error can leave earlier batches accepted.
Add --validate-first to check a private snapshot completely before uploading that same snapshot. This needs temporary disk space approximately equal to the input size while memory stays bounded. The snapshot is removed after success, failure or cancellation. Separate scan and validate commands do not upload anything or reserve a later import.
Progress goes to stderr. --json, or piping stdout, produces a machine-readable final report. The total row count remains unknown until a full check or clean EOF. Ctrl-C cancels work and reports accepted records plus any uncertain in-flight batch. Only 202 Accepted acknowledges a batch. The CLI stops on a failed or uncertain delivery and does not retry automatically or resume an earlier import.
Server formats
The ingest server accepts JSON objects or arrays, JSONL, CSV, TSV, PSV, SSV, and plain text. JSON needs no wrapper. The app and CLI convert XML into JSONL locally before sending it; the server does not accept raw XML. Input is normalized before storage, so tabular and text payloads become records and dangerous keys or embedded images may be transformed. In a JSON array or JSONL, each value becomes its own record: an object is stored as sent, a number, string, boolean or nested array is stored as {"value": ...}, and null, {} and [] are skipped.
curl -X POST "https://{region}.ingest.tailglow.io/{project_id}?key={ingest_key}"
-H "Content-Type: text/plain"
-d '{"method":"POST","path":"/v1/users","status":200}'Response and delivery
A successful request returns 202 Accepted. Tailglow then processes the records in the background.
Wait for that response, use the SDK queue, or otherwise record delivery failures. You do not need to wait for downstream processing, but a request can be lost if the caller exits before delivery completes.
The maximum server request body is 20 MiB (20,971,520 bytes). A larger body is rejected with 413 Payload Too Large; split it into smaller requests. File imports use the smaller 1 MiB batch limit described above.
Errors and retries
A 202 Accepted response means the data is durably accepted: it is queued on your server and retried internally until it lands. Accepted data is never dropped.
An explicit ingest rejection means nothing was recorded from that request. A lost response can leave delivery uncertain. A 4xx response means the request itself must change, so fix the key, payload, or size before resending.
The official SDKs retry transient failures automatically with backoff. App and CLI file imports stop and report instead, allowing you to check an uncertain batch before deciding whether to resend it. Customer-supplied idempotency keys are not supported by this import flow.
Refused requests appear on the server page’s Ingest Pipeline chart, grouped by reason. The error drawer marks each group as retryable or needing a change to the request. The full reason list is on the Enums page.