import { createWriteStream } from 'node:fs';import { Readable } from 'node:stream';import { pipeline } from 'node:stream/promises';const u = new URL('https://platform.streampixel.io/api/v1/analytics/log-files/66b1c2d3e4f5a6b7c8d9e0f1/download');u.searchParams.set('projectId', '664f1a2b3c4d5e6f7a8b9c0d');const res = await fetch(u, { headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } });await pipeline(Readable.fromWeb(res.body), createWriteStream('Showroom.log'));
import os, re, requestswith requests.get( "https://platform.streampixel.io/api/v1/analytics/log-files/66b1c2d3e4f5a6b7c8d9e0f1/download", params={"projectId": "664f1a2b3c4d5e6f7a8b9c0d"}, headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]}, stream=True,) as r: for line in r.iter_lines(decode_unicode=True): if re.search(r"Fatal error|=== Critical error|GPU Crash", line): print(line)
import { createWriteStream } from 'node:fs';import { Readable } from 'node:stream';import { pipeline } from 'node:stream/promises';const u = new URL('https://platform.streampixel.io/api/v1/analytics/log-files/66b1c2d3e4f5a6b7c8d9e0f1/download');u.searchParams.set('projectId', '664f1a2b3c4d5e6f7a8b9c0d');const res = await fetch(u, { headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } });await pipeline(Readable.fromWeb(res.body), createWriteStream('Showroom.log'));
import os, re, requestswith requests.get( "https://platform.streampixel.io/api/v1/analytics/log-files/66b1c2d3e4f5a6b7c8d9e0f1/download", params={"projectId": "664f1a2b3c4d5e6f7a8b9c0d"}, headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]}, stream=True,) as r: for line in r.iter_lines(decode_unicode=True): if re.search(r"Fatal error|=== Critical error|GPU Crash", line): print(line)
Return the log’s full text, decompressed, as a streamed text/plain response. There is no size cap: a session whose application logged the same error thousands of times a minute can produce a log of tens of megabytes, and those are exactly the ones you need. Read it as a stream.
Scope: read. The sibling GET /analytics/log-files/{logFileId}?projectId=… returns the file’s metadata plus a short-lived downloadUrl if you prefer to fetch from storage directly.
import { createWriteStream } from 'node:fs';import { Readable } from 'node:stream';import { pipeline } from 'node:stream/promises';const u = new URL('https://platform.streampixel.io/api/v1/analytics/log-files/66b1c2d3e4f5a6b7c8d9e0f1/download');u.searchParams.set('projectId', '664f1a2b3c4d5e6f7a8b9c0d');const res = await fetch(u, { headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } });await pipeline(Readable.fromWeb(res.body), createWriteStream('Showroom.log'));
import os, re, requestswith requests.get( "https://platform.streampixel.io/api/v1/analytics/log-files/66b1c2d3e4f5a6b7c8d9e0f1/download", params={"projectId": "664f1a2b3c4d5e6f7a8b9c0d"}, headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]}, stream=True,) as r: for line in r.iter_lines(decode_unicode=True): if re.search(r"Fatal error|=== Critical error|GPU Crash", line): print(line)