MT2Data Datalake via Colmeia
Overview
Access MT2Data Datalake files through the Colmeia middleware. Your Datalake credentials are connected to your tenant by MT2Data — you only need your tenant bearer secret to make requests.
Base URL: https://colmeia.mt2data.cloud/api/dl
Authentication
All data routes require your tenant bearer secret:
Authorization: Bearer <tenant-secret>
The middleware handles Datalake OAuth token management automatically.
Catalog
GET /api/dl/data/:tenantId/catalog
Returns all Symbols your Datalake subscription is authorized to access, with descriptions and file paths. Fast (~1s).
curl https://colmeia.mt2data.cloud/api/dl/data/YOUR_TENANT_ID/catalog \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
{
"clientId": "your-account",
"files": [
{
"Symbol": "DatasetSymbol",
"Description": "Human-readable description",
"FileName": "Data/MT2/DatasetSymbol.parquet"
}
],
"count": 1
}
File Listing
GET /api/dl/data/:tenantId/list
Lists files that appear in your catalog and exist in storage — with size and upload timestamp. Uses batched verification (~2s for 500 files).
| Parameter | Required | Default | Description |
|---|---|---|---|
limit | No | 1000 | Max files to return |
curl "https://colmeia.mt2data.cloud/api/dl/data/YOUR_TENANT_ID/list?limit=100" \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
GET /api/dl/data/:tenantId/count
Returns the total count of accessible files (~2s).
curl https://colmeia.mt2data.cloud/api/dl/data/YOUR_TENANT_ID/count \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
File Access
GET /api/dl/data/:tenantId/info/:symbol
Returns metadata for a file by Symbol (~0.5s).
curl https://colmeia.mt2data.cloud/api/dl/data/YOUR_TENANT_ID/info/DatasetSymbol \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
GET /api/dl/data/:tenantId/download/:symbol
Downloads a file by Symbol. Returns binary content.
curl https://colmeia.mt2data.cloud/api/dl/data/YOUR_TENANT_ID/download/DatasetSymbol \
-H "Authorization: Bearer YOUR_TENANT_SECRET" \
-o dataset.parquet
Performance Reference
| Endpoint | Speed | Use Case |
|---|---|---|
/catalog | ~1s | Browse available Symbols |
/info/:symbol | ~0.5s | File metadata |
/download/:symbol | ~0.5s + transfer | Download a file |
/list | ~2s | Verify file existence with metadata |
/count | ~2s | Count accessible files |
Recommended workflow:
GET /catalog— find the SymbolGET /download/:symbol— download directly
Code Examples
Python
import requests
BASE = "https://colmeia.mt2data.cloud/api/dl/data"
TENANT = "YOUR_TENANT_ID"
HEADERS = {"Authorization": "Bearer YOUR_TENANT_SECRET"}
# Browse catalog
catalog = requests.get(f"{BASE}/{TENANT}/catalog", headers=HEADERS).json()
print(f"Symbols available: {catalog['count']}")
# Download a file
with requests.get(f"{BASE}/{TENANT}/download/DatasetSymbol", headers=HEADERS, stream=True) as r:
r.raise_for_status()
with open("dataset.parquet", "wb") as f:
for chunk in r.iter_content(chunk_size=8192):
f.write(chunk)
JavaScript / Node.js
const BASE = 'https://colmeia.mt2data.cloud/api/dl/data/YOUR_TENANT_ID';
const HEADERS = { Authorization: 'Bearer YOUR_TENANT_SECRET' };
const catalog = await fetch(`${BASE}/catalog`, { headers: HEADERS }).then(r => r.json());
console.log(`Symbols: ${catalog.count}`);
const fileData = await fetch(`${BASE}/download/DatasetSymbol`, { headers: HEADERS })
.then(r => r.arrayBuffer());
require('fs').writeFileSync('dataset.parquet', Buffer.from(fileData));
Error Codes
| HTTP | Code | Meaning |
|---|---|---|
| 401 | no_token_found | Your Datalake account is not connected — contact MT2Data |
| 403 | upstream Access denied | Symbol not in your subscription |
| 404 | upstream Not found | File does not exist |