Data Readback API
Read your equipment's sensor data from Turbomechanica over HTTPS.
In the URLs below, replace $ORG with your organisation's Turbomechanica subdomain (for example, chevron for chevron.turbomechanica.ai).
1. Create API credentials
- Sign in to Turbomechanica as an Administrator or Developer.
- Go to Settings > Service Accounts.
- Under API credentials, select New credential, enter a name and select Create.
- Copy the Client ID and Client secret. The secret is shown only once.
From the same page you can Rotate a credential's secret or Delete a credential. The old secret stops working when you rotate.
2. Get an access token
https://$ORG.accounts.turbomechanica.ai/oauth/token (POST)
curl -s -X POST https://$ORG.accounts.turbomechanica.ai/oauth/token \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "client_credentials",
"client_id": "<CLIENT_ID>",
"client_secret": "<CLIENT_SECRET>",
"audience": "https://api.turbomechanica.ai"
}'
Response:
{
"access_token": "eyJhbGciOi...",
"scope": "readback:read",
"expires_in": 3600,
"token_type": "Bearer"
}
The token is valid for one hour. Reuse it until it expires, then request a new one.
3. Call the API
Base URL: https://api.$ORG.turbomechanica.ai/external
Send the token on every request:
Authorization: Bearer <access_token>
List equipment
GET /v1/equipments?page=1&page_size=100
{
"page": 1,
"page_size": 100,
"total": 2,
"equipments": [
{"id": 3, "name": "LNG Train 3 Expander", "tag": "LNG03-EXP", "sensor_count": 42}
]
}
List sensors on an equipment
GET /v1/sensors?equipment_id=3&page=1&page_size=100
{
"equipment_id": 3,
"page": 1,
"page_size": 100,
"total": 42,
"sensors": [
{"id": 3997, "tag": "LNG03-FI_TOTAL", "name": "Liquid Expander Flow", "unit": "gal(US)/min", "category": "physical"}
]
}
page_size is at most 1000 for both list calls.
Read data for an equipment
GET /v1/equipments/{equipment_id}/data
| Parameter | Required | Description |
|---|---|---|
start_time | Yes | ISO 8601 UTC, for example 2025-06-01T00:00:00Z |
end_time | Yes | ISO 8601 UTC, exclusive, at most 24 hours after start_time |
sensors | No | Comma-separated sensor tags. Default: all sensors on the equipment |
page | No | Default 1 |
page_size | No | Timestamps per page |
snapshot_id | No | Value from page 1, to keep all pages consistent |
curl -s -H "Authorization: Bearer $TOKEN" \
"https://api.$ORG.turbomechanica.ai/external/v1/equipments/3/data?start_time=2025-06-01T00:00:00Z&end_time=2025-06-01T01:00:00Z"
Read data for specific sensors
GET /v1/sensors/data?sensor_id=3997&sensor_id=3998&start_time=...&end_time=...
sensor_id is repeated once per sensor. The other parameters are the same as above, without sensors.
Data response
{
"equipment_id": 3,
"start_time": "2025-06-01T00:00:00Z",
"end_time": "2025-06-01T01:00:00Z",
"page": 1,
"page_size": 60,
"total_pages": 2,
"page_window": {"start_time": "2025-06-01T00:00:00Z", "end_time": "2025-06-01T00:30:00Z"},
"cadence_seconds": 30,
"snapshot_id": 5685063355100170478,
"timestamps": ["2025-06-01T00:00:00Z", "2025-06-01T00:00:30Z"],
"series": {
"LNG03-FI_TOTAL": [7970.7, 7933.8],
"LNG03-PI_SUC": [null, 412.1]
},
"sensors": {
"LNG03-FI_TOTAL": {"id": 3997, "name": "Liquid Expander Flow", "unit": "gal(US)/min", "category": "physical"}
}
}
timestampsand each array inserieshave the same length and align by index.nullmeans no reading at that timestamp.- Values are in the
unitlisted for each tag insensors.
4. Read a full time window
- Request page 1.
- Note
total_pagesandsnapshot_id. - Request pages 2 to
total_pageswith the same parameters, addingpageandsnapshot_id. - For windows longer than 24 hours, repeat for consecutive windows.
Limits
- Window (
end_time - start_time): at most 24 hours. - One page covers at most 1 hour of data.
page_size× number of sensors: at most 500,000 values. Usesensorsorsensor_idto request fewer sensors for larger pages.- Concurrent data requests are limited. Requests over the limit receive
503; retry after a short delay.
Errors
| Status | Meaning |
|---|---|
401 | Token missing, invalid or expired |
403 | Token does not have the readback:read scope |
404 | Equipment or path not found |
422 | Invalid parameter; detail names the problem and the allowed value |
503 | Too many concurrent data requests; retry |
Python example
import requests
ORG = "chevron"
token = requests.post(
f"https://{ORG}.accounts.turbomechanica.ai/oauth/token",
json={
"grant_type": "client_credentials",
"client_id": CLIENT_ID,
"client_secret": CLIENT_SECRET,
"audience": "https://api.turbomechanica.ai",
},
).json()["access_token"]
base = f"https://api.{ORG}.turbomechanica.ai/external"
headers = {"Authorization": f"Bearer {token}"}
params = {"start_time": "2025-06-01T00:00:00Z", "end_time": "2025-06-02T00:00:00Z"}
first = requests.get(f"{base}/v1/equipments/3/data", params=params, headers=headers).json()
pages = [first]
for page in range(2, first["total_pages"] + 1):
pages.append(
requests.get(
f"{base}/v1/equipments/3/data",
params={**params, "page": page, "snapshot_id": first["snapshot_id"]},
headers=headers,
).json()
)