const fs = require("fs");
const response = await fetch(
"https://api-v2.getomni.ai/api/v1/artifacts/art-report/content",
{ headers: { "x-api-key": "<your-api-key>" } },
);
const buffer = Buffer.from(await response.arrayBuffer());
fs.writeFileSync("spread-report.pdf", buffer);
import requests
url = "https://api-v2.getomni.ai/api/v1/artifacts/art-report/content"
headers = {"x-api-key": "<your-api-key>"}
response = requests.request("GET", url, headers=headers)
with open("spread-report.pdf", "wb") as file:
file.write(response.content)
curl --request GET \
--url https://api-v2.getomni.ai/api/v1/artifacts/art-report/content \
--header 'x-api-key: <your-api-key>' \
--output spread-report.pdf
Artifacts
Download Artifact
Download an artifact’s bytes in its canonical format
GET
/
api
/
v1
/
artifacts
/
:artifactId
/
content
const fs = require("fs");
const response = await fetch(
"https://api-v2.getomni.ai/api/v1/artifacts/art-report/content",
{ headers: { "x-api-key": "<your-api-key>" } },
);
const buffer = Buffer.from(await response.arrayBuffer());
fs.writeFileSync("spread-report.pdf", buffer);
import requests
url = "https://api-v2.getomni.ai/api/v1/artifacts/art-report/content"
headers = {"x-api-key": "<your-api-key>"}
response = requests.request("GET", url, headers=headers)
with open("spread-report.pdf", "wb") as file:
file.write(response.content)
curl --request GET \
--url https://api-v2.getomni.ai/api/v1/artifacts/art-report/content \
--header 'x-api-key: <your-api-key>' \
--output spread-report.pdf
Download an artifact’s bytes. A
REPORT downloads as a PDF; a SPREADSHEET downloads as an .xlsx workbook. The response is the raw file with Content-Disposition: attachment, not JSON.
Authentication
Requires thex-api-key header with a valid workspace API key.
Path Parameters
string
required
The artifact id, from a spread’s
artifacts array or the spread.completed
webhook.Response
The raw file bytes. TheContent-Type header is application/pdf for a
REPORT and
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for a
SPREADSHEET. A 404 is returned if the artifact isn’t in your workspace.
const fs = require("fs");
const response = await fetch(
"https://api-v2.getomni.ai/api/v1/artifacts/art-report/content",
{ headers: { "x-api-key": "<your-api-key>" } },
);
const buffer = Buffer.from(await response.arrayBuffer());
fs.writeFileSync("spread-report.pdf", buffer);
import requests
url = "https://api-v2.getomni.ai/api/v1/artifacts/art-report/content"
headers = {"x-api-key": "<your-api-key>"}
response = requests.request("GET", url, headers=headers)
with open("spread-report.pdf", "wb") as file:
file.write(response.content)
curl --request GET \
--url https://api-v2.getomni.ai/api/v1/artifacts/art-report/content \
--header 'x-api-key: <your-api-key>' \
--output spread-report.pdf
