Downloading Results
When compilation succeeds, the server sends a compile.done message containing a download_url — a time-limited presigned URL pointing to the compiled binary on Pure’s object storage.
Fetching the binary
Section titled “Fetching the binary”curl -fL "$DOWNLOAD_URL" -o myappchmod +x myappThe URL is a standard HTTPS GET request. No authentication header is needed — the credentials are embedded in the URL itself.
URL expiry
Section titled “URL expiry”The expires_at field in compile.done is a Unix timestamp in milliseconds indicating when the URL expires.
{ "type": "compile.done", "job_id": "job_xyz789", "download_url": "https://...", "expires_at": 1714003600000, "work_units": 1280}Default expiry is 1 hour from when the URL is generated. After expiry the URL returns HTTP 403.
To download the binary after the URL has expired, re-subscribe to the job via jobs.subscribe. The server replays the compile.done event with a freshly generated presigned URL:
{ "type": "jobs.subscribe", "job_id": "job_xyz789"}Checksum verification
Section titled “Checksum verification”The response headers include the binary’s SHA-256 and MD5:
| Header | Value |
|---|---|
x-amz-checksum-sha256 | Base64-encoded SHA-256 of the binary |
Content-MD5 | Base64-encoded MD5 of the binary |
Verify the SHA-256 after download:
EXPECTED=$(curl -sI "$DOWNLOAD_URL" | grep -i x-amz-checksum-sha256 | awk '{print $2}' | tr -d '\r' | base64 -d | xxd -p -c 256)ACTUAL=$(sha256sum myapp | awk '{print $1}')[ "$EXPECTED" = "$ACTUAL" ] && echo "ok" || echo "checksum mismatch"The compile.done message also includes the SHA-256 (hex-encoded) in the job record accessible via the REST API.
Binary retention
Section titled “Binary retention”Compiled binaries are retained on Pure’s storage for 30 days after the job finishes. After that, the presigned URL and the binary itself are deleted. Download and store binaries you intend to keep before the retention window closes.
REST API (alternative)
Section titled “REST API (alternative)”You can also fetch job metadata and a fresh download URL via HTTP without a WebSocket connection:
GET https://api.pure.dev/jobs/<job_id>Authorization: Bearer pk_live_...This returns the job record including current status, work_units, and a presigned download URL for succeeded jobs.