Push your data
Send files to your Data Tunnel from the dashboard or on a schedule from your own systems.
Your agents work from your data. The Data Tunnel is how it gets to us: files you upload land in your organization's own storage, in your data region, and nowhere else. CSV, TSV, JSON, and JSONL all work, exactly as they come out of your database. You don't need to clean them up first.
From the dashboard
Open Tunnel and drop the file. That's it. Good for one-off files and for trying things out.
From your systems, on a schedule
Most teams set up one small scheduled job that exports fresh data and pushes
it every hour. You need an API key (from Keys) and about twenty lines of
script. The upload happens in three calls: init starts an upload, sign
returns URLs to send the file's parts to, and complete finishes it.
#!/usr/bin/env bash
# Push a file to your Allocate Data Tunnel.
# ALLOCATE_API_KEY=ak_live_... ./push.sh export.csv
set -euo pipefail
FILE="$1"
SIZE=$(wc -c < "$FILE")
API="https://api.allocate.network"
AUTH="Authorization: Bearer $ALLOCATE_API_KEY"
INIT=$(curl -sf "$API/tunnel/op" -H "$AUTH" -H "content-type: application/json" \
-d "{\"op\":\"init\",\"fileName\":\"$(basename "$FILE")\",\"sizeBytes\":$SIZE}")
KEY=$(jq -r .key <<< "$INIT"); UPLOAD=$(jq -r .uploadId <<< "$INIT")
PART_BYTES=$(jq -r .partBytes <<< "$INIT")
PARTS=$(( (SIZE + PART_BYTES - 1) / PART_BYTES )); [ "$PARTS" -lt 1 ] && PARTS=1
ETAGS="[]"
for N in $(seq 1 "$PARTS"); do
URL=$(curl -sf "$API/tunnel/op" -H "$AUTH" -H "content-type: application/json" \
-d "{\"op\":\"sign\",\"key\":\"$KEY\",\"uploadId\":\"$UPLOAD\",\"partNumbers\":[$N]}" \
| jq -r '.urls[0].url')
# Part URLs to api.allocate.network need your key; presigned storage URLs
# (region-pinned clouds) are self-authorizing and must be called bare.
HDR=(); case "$URL" in "$API"*) HDR=(-H "$AUTH");; esac
# dd slices the part by offset/length; piping head into tail would SIGPIPE
# under `set -o pipefail` and abort the whole upload on the first part.
ETAG=$(dd if="$FILE" bs="$PART_BYTES" skip=$((N-1)) count=1 2>/dev/null \
| curl -sf -X PUT --data-binary @- "${HDR[@]}" "$URL" -D - -o /dev/null \
| awk -F'"' 'tolower($0) ~ /^etag/ { print $2 }')
ETAGS=$(jq -c ". + [{\"partNumber\":$N,\"etag\":\"$ETAG\"}]" <<< "$ETAGS")
done
curl -sf "$API/tunnel/op" -H "$AUTH" -H "content-type: application/json" \
-d "{\"op\":\"complete\",\"key\":\"$KEY\",\"uploadId\":\"$UPLOAD\",\"parts\":$ETAGS}"
echo "uploaded: $KEY"Run it from cron, a scheduled task, or your job runner:
0 * * * * ALLOCATE_API_KEY=ak_live_... /opt/allocate/push.sh /exports/latest.csvGET /tunnel/files lists what you've sent. Uploads are resumable: if a push
dies halfway, just run it again.
What to export
Whatever your agent needs to see: the tables that describe your customers, your products or events, and the actions people take. Export views are a good fit; the Tunnel only ever needs read access on your side. If you're not sure what to send, ask us in your shared channel and we'll agree the exact list together.
Next
Turn files into your knowledge graph: Import mapping.