Retrieve artifact metadata and download URL - Fabric
Retrieve artifact metadata and download URL
cURL
curl --request GET \
--url 'https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts/{artifact_id}?expires_seconds=900' \
--header 'domain: <domain>'
Python
import requests
url = "https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts/{artifact_id}?expires_seconds=900"
headers = {"domain": "<domain>"}
response = requests.get(url, headers=headers)
print(response.text)
JavaScript (Fetch API)
const options = {method: 'GET', headers: {domain: '<domain>'}};
fetch('https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts/{artifact_id}?expires_seconds=900', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts/{artifact_id}?expires_seconds=900",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"domain: <domain>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Go
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts/{artifact_id}?expires_seconds=900"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("domain", "<domain>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Unirest (Java)
HttpResponse<String> response = Unirest.get("https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts/{artifact_id}?expires_seconds=900")
.header("domain", "<domain>")
.asString();
Ruby
require 'uri'
require 'net/http'
url = URI("https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts/{artifact_id}?expires_seconds=900")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["domain"] = '<domain>'
response = http.request(request)
puts response.read_body
Response Codes
200
401
403
404
422
500
Example JSON Responses
Successful Response
{
"artifact_id": "art_95c650ded4824dc79bb6df16427e4a10",
"kind": "csv",
"source": "upload",
"bytes": 45678,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"content_type": "text/csv",
"uri": "s3://product-agent-data-prod-ue2/optimize-artifacts/svc_yourClientId/art_95c650ded4824dc79bb6df16427e4a10/catalog.csv",
"original_filename": "catalog.csv",
"brand_id": "691df5949676c8e0b1d7b6b3",
"created_at": "2026-05-15T10:30:00Z",
"download_url": "https://product-agent-data-prod-ue2.s3.amazonaws.com/optimize-artifacts/svc_yourClientId/art_95c650ded4824dc79bb6df16427e4a10/catalog.csv?X-Amz-Signature=...",
"download_url_expires_at": "2026-05-15T10:45:00Z"
}
Client Error Response
{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}
Headers
- domain: string, required
- The brand domain name used to scope the request to a specific brand's data and configuration. Example: """vessel.com"""
Path Parameters
- artifact_id: string, required
- Artifact identifier returned by
POST /v2/optimize/artifacts. Example: "art_95c650ded4824dc79bb6df16427e4a10"
- Artifact identifier returned by
Query Parameters
- expires_seconds: integer, default: 900
- Lifetime of the signed
download_urlin seconds. Minimum 60, maximum 3600, default 900. Example: 900
- Lifetime of the signed
Response Details
artifact_id: string, required
- Example: "art_95c650ded4824dc79bb6df16427e4a10"
kind: enum
, required - Artifact file format. Supported value is
csv.
- Artifact file format. Supported value is
source: enum
, required - Indicates how the artifact was ingested. Available options:
upload,presigned,uri,generated
- Indicates how the artifact was ingested. Available options:
content_type: string, required
- Example: "text/csv"
uri: string, required
- Example: "s3://product-agent-data-prod-ue2/optimize-artifacts/svc_yourClientId/art_95c650ded4824dc79bb6df16427e4a10/catalog.csv"
brand_id: string, required
- Example: "691df5949676c8e0b1d7b6b3"
created_at: string
, required - Example: "2026-05-15T10:30:00Z"
download_url: string, required
- Short-lived presigned URL for downloading the original file contents. Example: "https://product-agent-data-prod-ue2.s3.amazonaws.com/optimize-artifacts/svc_yourClientId/art_95c650ded4824dc79bb6df16427e4a10/catalog.csv?X-Amz-Signature=..."
download_url_expires_at: string
, required - Expiry timestamp in UTC for
download_url. Example: "2026-05-15T10:45:00Z"
- Expiry timestamp in UTC for
bytes: integer | null
- Example: 45678
sha256: string | null
- Example: "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
original_filename: string | null
- Example: "catalog.csv"