AssetArc API Documentation
Programmatic access to facilities-management analytics, classification, and dataset management.
Getting Started
- Go to Account Settings
- Generate an API key (Pro tier)
- Add the key to your
Authorizationheader
Authentication
Authorization: Bearer aa_your_key
Base URL
https://assetarc.io/api/v1
Rate Limits
5,000 requests/day (Pro)
Resets at midnight UTC
Code Examples — cURL, Python, JavaScript
cURL
# List all datasets
curl -H "Authorization: Bearer aa_your_key" \
https://assetarc.io/api/v1/datasets
# Classify a work order
curl -X POST https://assetarc.io/api/v1/classify \
-H "Authorization: Bearer aa_your_key" \
-H "Content-Type: application/json" \
-d '{"text": "Air conditioning unit making grinding noise"}'
# Import CSV dataset
curl -X POST https://assetarc.io/api/v1/datasets/workorders/import \
-H "Authorization: Bearer aa_your_key" \
-H "Content-Type: text/csv" \
--data-binary @workorders.csv
Python (requests)
import requests
API_KEY = "aa_your_key"
BASE = "https://assetarc.io/api/v1"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# List datasets
resp = requests.get(f"{BASE}/datasets", headers=HEADERS)
print(resp.json())
# Classify work order text
resp = requests.post(f"{BASE}/classify", headers=HEADERS, json={
"text": "Leaking pipe in basement car park level 2"
})
print(resp.json()["data"])
# Import JSON dataset
import json
with open("workorders.json") as f:
records = json.load(f)
resp = requests.post(
f"{BASE}/datasets/workorders/import",
headers={**HEADERS, "Content-Type": "application/json"},
json=records,
)
print(resp.json())
JavaScript (fetch)
const API_KEY = "aa_your_key";
const BASE = "https://assetarc.io/api/v1";
const headers = {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
// List datasets
const datasets = await fetch(`${BASE}/datasets`, { headers })
.then(r => r.json());
console.log(datasets.data);
// Classify work order text
const result = await fetch(`${BASE}/classify`, {
method: "POST",
headers,
body: JSON.stringify({
text: "Emergency generator failed to start during test"
}),
}).then(r => r.json());
console.log(result.data);
// Detect anomalies
const anomalies = await fetch(`${BASE}/detect-anomalies`, {
method: "POST",
headers,
body: JSON.stringify({ records: workOrderData }),
}).then(r => r.json());
console.log(anomalies.data.anomalies);