How to Export Asset Metadata from Orange Logic
Orange Logic (OrangeDAM) is an enterprise DAM with a powerful API-first architecture. Here's how to extract your asset metadata into a spreadsheet for quality assessment.
Orange Logic supports built-in metadata CSV downloads directly from the asset library UI — select your assets, download metadata, and you have a spreadsheet. For programmatic access, the Search API lets you query assets across your entire library and retrieve all metadata fields as JSON. The DataTable API provides single-asset detail and the ability to discover every metadata field configured in your instance.
Orange Logic UI Metadata Download
Orange Logic's web interface lets you select assets and download their metadata as a CSV text file — no actual files are downloaded, only the metadata fields. You can then open the CSV in Excel, Google Sheets, or any spreadsheet tool.
Search API
The Orange Logic Search API is the primary method for querying assets programmatically. It supports rich query syntax with boolean operators, date ranges, field-specific searches, and wildcards. Use fields=* to retrieve all populated metadata fields, or specify individual fields for a targeted export.
criterion:value (e.g., DocType:Image, Keyword:product). Use * to match all assets.import requests
import csv
import json
# Replace with your Orange Logic instance URL and credentials
BASE_URL = "https://your-instance.orangelogic.com"
AUTH_TOKEN = "your_bearer_token"
HEADERS = {
"Authorization": f"Bearer {AUTH_TOKEN}",
"Accept": "application/json",
}
def search_assets(query="*", limit=50, offset=0):
"""Search assets via the Orange Logic Search API."""
resp = requests.post(
f"{BASE_URL}/webapi/Search",
headers=HEADERS,
json={
"query": query,
"fields": "*", # All populated fields
"format": "JSON",
"limit": limit,
"offset": offset,
},
)
resp.raise_for_status()
return resp.json()
# Paginate through all results
all_assets = []
offset = 0
limit = 50
while True:
data = search_assets(query="*", limit=limit, offset=offset)
items = data.get("APIResponse", {}).get("Items", [])
if not items:
break
all_assets.extend(items)
total = data.get("APIResponse", {}).get("TotalCount", 0)
offset += limit
if offset >= total:
break
# Write to CSV
with open("orangelogic_metadata.csv", "w", newline="") as f:
writer = csv.writer(f)
writer.writerow([
"Record ID", "System Identifier", "Title",
"Media Type", "Keywords", "Caption",
"Media Date", "Create Date", "Edit Date",
"Width", "Height", "MIME Type",
])
for asset in all_assets:
writer.writerow([
asset.get("RecordID", ""),
asset.get("SystemIdentifier", ""),
asset.get("Title", ""),
asset.get("MediaType", ""),
asset.get("Keywords", ""),
asset.get("CaptionShort", ""),
asset.get("MediaDate", ""),
asset.get("CreateDate", ""),
asset.get("EditDate", ""),
asset.get("MaxWidth", ""),
asset.get("MaxHeight", ""),
asset.get("MIMEtype", ""),
])
print(f"Exported {len(all_assets)} assets to orangelogic_metadata.csv")AND, OR, NOT), date comparisons (CreateDate>2024-01-01), wildcards (Title:*product*), and field-specific searches using Namespace.FieldName:value for custom metadata fields.DataTable API
The DataTable API provides fine-grained access to individual asset records and metadata field definitions. Use the :ListFields action to discover every metadata field configured in your instance, then use the :Read action to retrieve detailed metadata for individual assets.
:ListFields endpoint to discover all available metadata fields in your Orange Logic instance. This returns the field name, data type, whether it's multi-valued, and security settings.:Read endpoint to retrieve full metadata for specific assets by their Record ID.import requests
import csv
BASE_URL = "https://your-instance.orangelogic.com"
AUTH_TOKEN = "your_bearer_token"
HEADERS = {
"Authorization": f"Bearer {AUTH_TOKEN}",
"Accept": "application/json",
}
# Step 1: List all available metadata fields
def list_fields(doc_type="Documents.All"):
"""Discover all metadata fields for a document type."""
resp = requests.get(
f"{BASE_URL}/API/DataTable/V2.2/{doc_type}:ListFields",
headers=HEADERS,
)
resp.raise_for_status()
return resp.json()
fields = list_fields()
print(f"Found {len(fields)} metadata fields")
# Step 2: Read metadata for a specific asset
def read_asset(doc_type, record_id):
"""Get full metadata for a single asset."""
resp = requests.get(
f"{BASE_URL}/API/DataTable/V2.2/{doc_type}:Read",
headers=HEADERS,
params={"RecordID": record_id},
)
resp.raise_for_status()
return resp.json()
# Step 3: Export field definitions to CSV (useful for metadata audits)
with open("orangelogic_field_definitions.csv", "w", newline="") as f:
writer = csv.writer(f)
writer.writerow([
"Field Name", "Namespace", "Data Type",
"Max Length", "Multi-Valued", "Required",
"Read Only", "Searchable", "Security Enabled",
])
for field in fields:
writer.writerow([
field.get("NameSpaceFieldName", ""),
field.get("NameSpace", ""),
field.get("DataType", ""),
field.get("DataLength", ""),
field.get("IsMultiValued", ""),
field.get("IsRequired", ""),
field.get("ReadOnly", ""),
field.get("SearchableIndividually", ""),
field.get("SecurityEnabled", ""),
])
print("Exported field definitions to orangelogic_field_definitions.csv")What metadata fields can you export?
| Field | UI Export | Search API | DataTable API |
|---|---|---|---|
| Title | ✓ | ✓ | ✓ |
| Caption / description | ✓ | ✓ | ✓ |
| Keywords | ✓ | ✓ | ✓ |
| Media type (image, video, etc.) | ✓ | ✓ | ✓ |
| MIME type | ✓ | ✓ | ✓ |
| Dimensions (W x H) | ✓ | ✓ | ✓ |
| Record ID | ✓ | ✓ | ✓ |
| System identifier | ✓ | ✓ | ✓ |
| Create date | ✓ | ✓ | ✓ |
| Edit date | ✓ | ✓ | ✓ |
| Media date | ✓ | ✓ | ✓ |
| Custom metadata fields | ✓ | ✓ | ✓ |
| IPTC embedded metadata | ✓ | ✓ | ✓ |
| EXIF embedded metadata | ✓ | ✓ | ✓ |
| XMP embedded metadata | ✓ | ✓ | ✓ |
| Folder / parent path | ✓ | ✓ | ✓ |
| Dominant colors | ✕ | ✓ | ✓ |
| Rendition URLs | ✕ | ✓ | ✓ |
| Field definitions / schema | ✕ | ✕ | ✓ |
| Permission details | ✕ | ✕ | ✓ |
- DataTable Read is single-asset only: The
:Readaction returns metadata for one asset at a time. For bulk metadata extraction, use the Search API to query multiple assets, or use the iAPI desktop tool for CSV-based bulk operations. - Field-level security: Individual metadata fields can have security restrictions. Your API user may not see certain fields if their role is excluded from the field's
CanReadRoleslist. If your export is missing expected fields, check field-level permissions with your admin. - Search API field value limit: The
fieldsparameter has a maximum value length of 2,048 characters per field. For very long text fields, the value may be truncated. Use Postman with body parameters instead of URL parameters for complex queries. - Two endpoint conventions: Orange Logic has both
/webapi/(newer) and/api/(legacy) endpoints. Prefer/webapi/when both are available.
You have your metadata export.
Now score it.
Upload your CSV or Excel file to MQS and get a structural metadata health score out of 100 with dimension breakdowns and actionable diagnostics.