Base URL
http://developers-api-server.prod.quantiix.ai/api/v1
API 1: Authentication
Get your API token to access all protected endpoints. Token is valid for 24 hours.
Endpoint
POST /api/v1/security/getAPIToken
Request Body
{
"userEmail": "user@example.com",
"password": "your_password"
}
Example
curl -X POST "http://developers-api-server.prod.quantiix.ai/api/v1/security/getAPIToken" \
-H "Content-Type: application/json" \
-d '{
"userEmail": "user@example.com",
"password": "your_password"
}'
Response
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
✓ Token received! Next Step:
Use this token in the Authorization: Bearer YOUR_TOKEN header for all subsequent requests.
API 2: Get Machines
Retrieve a list of all machines in your factory with their unique IDs.
Endpoint
Headers
Authorization: Bearer YOUR_TOKEN
Example
curl -X GET "http://developers-api-server.prod.quantiix.ai/api/v1/machineInfo" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
{
"machines": [
{
"machineDisplayName": "CNC Lathe 1",
"machineUniqueId": "MACHINE_001",
"factoryId": "10",
"factoryName": "Main Production Floor"
}
]
}
Key Fields
| Field |
Description |
| machineUniqueId |
Use this ID for all machine-specific API calls |
| machineDisplayName |
Human-readable machine name |
✓ Got machine list! Next Step:
Save the machineUniqueId values. Use them to get real-time status.
API 3: Machine State
Get the current state of any machine in real-time.
Endpoint
GET /api/v1/machineState?machineId=MACHINE_001
Parameters
| Parameter |
Required |
Description |
| machineId |
Yes |
Machine unique ID from API 2 |
Example
curl -X GET "http://developers-api-server.prod.quantiix.ai/api/v1/machineState?machineId=MACHINE_001" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
{
"machineState": "RUNNING",
"durationInMinutes": 120
}
Machine States
| State |
Description |
| RUNNING |
Machine is actively producing |
| IDLE |
Machine is on but not producing |
| OFF |
Machine is powered off |
✓ Real-time status working! Next Step:
For historical data and trend analysis, continue to the final API.
API 4: Machine Activity Log
Retrieve historical activity data for any machine over a specified time range (up to 30 days).
Endpoint
GET /api/v1/machineActivity?machineId=MACHINE_001&startTime=1734566400000&endTime=1734652800000
Parameters
| Parameter |
Required |
Description |
| machineId |
Yes |
Machine unique ID |
| startTime |
Yes |
Start timestamp in milliseconds (UTC) |
| endTime |
Yes |
End timestamp in milliseconds (UTC) |
Calculating Timestamps
// JavaScript - Get last 24 hours
const endTime = Date.now();
const startTime = endTime - (24 * 60 * 60 * 1000);
// Python - Get last 24 hours
import time
end_time = int(time.time() * 1000)
start_time = end_time - (24 * 60 * 60 * 1000)
Example
curl -X GET "http://developers-api-server.prod.quantiix.ai/api/v1/machineActivity?machineId=MACHINE_001&startTime=1734566400000&endTime=1734652800000" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
{
"machineId": "MACHINE_001",
"activity": [
{
"state": "RUNNING",
"startTime": 1734566400000,
"endTime": 1734570000000,
"durationInMinutes": 60
},
{
"state": "IDLE",
"startTime": 1734570000000,
"endTime": 1734572400000,
"durationInMinutes": 40
}
]
}
⚠️ Limits
Maximum time range: 30 days. All timestamps are in UTC. Records are sorted by startTime in ascending order.
✓ All APIs covered! Next Step:
See how all 4 APIs work together in a complete workflow.
5. Complete Workflow Example
See all 4 APIs working together in a real-world integration.
Python Implementation
import requests
import time
BASE_URL = "http://developers-api-server.prod.quantiix.ai/api/v1"
# 1. Authenticate
response = requests.post(f"{BASE_URL}/security/getAPIToken",
json={"userEmail": "user@example.com", "password": "password"})
token = response.json()['token']
print("✓ Authenticated")
# 2. Get Machines
response = requests.get(f"{BASE_URL}/machineInfo",
headers={"Authorization": f"Bearer {token}"})
machines = response.json()['machines']
machine_id = machines[0]['machineUniqueId']
print(f"✓ Found {len(machines)} machines")
# 3. Get Current State
response = requests.get(f"{BASE_URL}/machineState",
params={"machineId": machine_id},
headers={"Authorization": f"Bearer {token}"})
state = response.json()
print(f"✓ Machine state: {state['machineState']}")
# 4. Get Activity (Last 24 Hours)
end_time = int(time.time() * 1000)
start_time = end_time - (24 * 60 * 60 * 1000)
response = requests.get(f"{BASE_URL}/machineActivity",
params={"machineId": machine_id, "startTime": start_time, "endTime": end_time},
headers={"Authorization": f"Bearer {token}"})
activity = response.json()
print(f"✓ Retrieved {len(activity['activity'])} activity records")
JavaScript Implementation
const axios = require('axios');
const BASE_URL = 'http://developers-api-server.prod.quantiix.ai/api/v1';
async function quantiixWorkflow() {
// 1. Authenticate
const authResponse = await axios.post(`${BASE_URL}/security/getAPIToken`, {
userEmail: 'user@example.com',
password: 'password'
});
const token = authResponse.data.token;
console.log('✓ Authenticated');
// 2. Get Machines
const machinesResponse = await axios.get(`${BASE_URL}/machineInfo`, {
headers: { 'Authorization': `Bearer ${token}` }
});
const machines = machinesResponse.data.machines;
console.log(`✓ Found ${machines.length} machines`);
// 3. Get State
const stateResponse = await axios.get(`${BASE_URL}/machineState`, {
params: { machineId: machines[0].machineUniqueId },
headers: { 'Authorization': `Bearer ${token}` }
});
console.log(`✓ Machine state: ${stateResponse.data.machineState}`);
// 4. Get Activity (Last 24 Hours)
const endTime = Date.now();
const startTime = endTime - (24 * 60 * 60 * 1000);
const activityResponse = await axios.get(`${BASE_URL}/machineActivity`, {
params: {
machineId: machines[0].machineUniqueId,
startTime: startTime,
endTime: endTime
},
headers: { 'Authorization': `Bearer ${token}` }
});
console.log(`✓ Retrieved ${activityResponse.data.activity.length} records`);
}
quantiixWorkflow();
Best Practices
Token Management
- Store tokens securely (environment variables, never in client-side code)
- Reuse tokens for 24 hours - don't request a new token for each API call
- Implement automatic token refresh when receiving 401 errors
Rate Limits
| Endpoint |
Limit |
| Get Token |
10 requests/minute |
| All other endpoints |
100 requests/minute |
Polling Recommendations
- Real-time monitoring: Poll machine state every 30-60 seconds
- Historical data: Cache activity data older than 1 hour
- Machine list: Cache and refresh daily (changes infrequently)
✓ Ready to integrate! Questions?
Check the FAQ section for common questions and support information.
6. FAQ & Support
Frequently Asked Questions
Q: How long are tokens valid?
Tokens are valid for 24 hours from the time of issuance. After 24 hours, you'll receive 401 errors and need to re-authenticate.
Q: What timezone are timestamps in?
All timestamps are in UTC (Coordinated Universal Time). Make sure to convert to/from UTC when working with local times.
Q: Can I request data for multiple machines in one API call?
No, you need to make separate requests for each machine. Use the machine list endpoint to get all machine IDs first.
Q: What's the maximum time range for activity queries?
The maximum time range is 30 days between startTime and endTime parameters.
Q: Are activity records always sorted by time?
Yes, activity records are always sorted by startTime in ascending order (oldest first).
Q: How often should I poll for real-time data?
We recommend polling machine state every 30-60 seconds for real-time monitoring. More frequent polling may trigger rate limits.
Q: What happens if I hit the rate limit?
You'll receive a 429 (Too Many Requests) error. Implement exponential backoff and retry logic in your application.
Q: Can I use HTTPS instead of HTTP?
Yes, for production environments we strongly recommend HTTPS. Contact support to get HTTPS endpoint details.
Support
Need Help?
Support Email: service@quantiix.ai
Developer Portal: Coming Soon
Documentation: Coming Soon
When Reporting Issues
Please include the following information:
- HTTP request and response (remove sensitive data like tokens)
- Error messages and status codes
- Timestamp when the issue occurred
- Machine IDs involved (if applicable)
- Programming language and library versions
Common Use Cases
Real-Time Dashboard
Poll machine state every 30-60 seconds to display current status across your factory floor.
Daily Production Report
Retrieve last 24 hours of activity data each morning to calculate efficiency metrics and downtime analysis.
Downtime Alerts
Monitor for IDLE or OFF states exceeding a threshold duration and trigger alerts to maintenance teams.
OEE Calculation
Use activity history to calculate Overall Equipment Effectiveness by analyzing running vs. idle vs. off time.
Trend Analysis
Compare activity data across multiple days or weeks to identify patterns and optimization opportunities.
✓ You're all set!
You have everything you need to integrate with the Quantiix API. Happy building!