Customer API Documentation
API that allows customers to read and write device data using a restricted set of keys.
Authentication uses your username and password via HTTP Basic Auth. No separate API keys are needed.
Base URL: https://api.dc3control.net/api
Authentication
All endpoints use HTTP Basic Auth. Pass your the platform username and password with every request.
| Header | Value |
|---|---|
Authorization |
Basic <base64(username:password)> |
Most HTTP clients (Postman, curl, etc.) have a built-in Basic Auth option so you don't need to encode manually.
curl example:
curl -u "your_username:your_password" "https://api.dc3control.net/api/timeseries?..."
Errors:
| Status | Reason |
|---|---|
401 |
Missing, malformed, or invalid credentials |
Endpoints
GET /attributes
Fetch the latest attribute values for a device.
Query Parameters:
| Parameter | Required | Description |
|---|---|---|
entityType |
Yes | Entity type (e.g. DEVICE) |
entityId |
Yes | the platform entity UUID |
keys |
Yes | Comma-separated list of attribute keys |
Example Request:
curl -u "username:password" \
"https://api.dc3control.net/api/attributes?entityType=DEVICE&entityId=abc-123&keys=status,firmware_version"
Example Response:
[
{ "key": "status", "value": "online", "lastUpdateTs": 1712000000000 },
{ "key": "firmware_version", "value": "2.1.0", "lastUpdateTs": 1712000000000 }
]
GET /timeseries
Fetch the latest timeseries values for a device.
Query Parameters:
| Parameter | Required | Description |
|---|---|---|
entityType |
Yes | Entity type (e.g. DEVICE) |
entityId |
Yes | the platform entity UUID |
keys |
Yes | Comma-separated list of timeseries keys |
Example Request:
curl -u "username:password" \
"https://api.dc3control.net/api/timeseries?entityType=DEVICE&entityId=abc-123&keys=temperature,pressure"
Example Response:
{
"temperature": [{ "ts": 1712000000000, "value": "72.5" }],
"pressure": [{ "ts": 1712000000000, "value": "14.7" }]
}
POST /attributes
Write attribute values to a device.
Request Body:
| Field | Required | Description |
|---|---|---|
entityType |
Yes | Entity type (e.g. DEVICE) |
entityId |
Yes | the platform entity UUID |
data |
Yes | Object of key/value pairs to write |
Example Request:
curl -u "username:password" -X POST \
"https://api.dc3control.net/api/attributes" \
-H "Content-Type: application/json" \
-d '{"entityType":"DEVICE","entityId":"abc-123","data":{"status":"online"}}'
Example Response:
null
the platform returns an empty response on success.
POST /timeseries
Write telemetry values to a device.
Request Body:
| Field | Required | Description |
|---|---|---|
entityId |
Yes | the platform entity UUID |
data |
Yes | Object of key/value pairs to write |
Example Request:
curl -u "username:password" -X POST \
"https://api.dc3control.net/api/timeseries" \
-H "Content-Type: application/json" \
-d '{"entityId":"abc-123","data":{"temperature":72.5,"pressure":14.7}}'
Example Response:
null
the platform returns an empty response on success.
Error Responses
All endpoints return errors in this format:
{ "error": "description of the error" }
| Status | Meaning |
|---|---|
400 |
Missing required parameter |
401 |
Missing or invalid the platform credentials |
403 |
Key not in allowed list |
500 |
Internal server error / the platform request failed |
3. Retrieve Latest Device Data
Returns the latest attribute and time-series values for all devices under the authenticated user's account. Uses the same Basic Auth as all other Customer API endpoints.
3.1 Request Method
POST
3.2 Endpoint
https://api.dc3control.net/api/devices/latest
3.3 Request Headers
| Header | Description |
|---|---|
Authorization |
Basic <base64(username:password)> |
Content-Type |
application/json |
3.4 Request Body
All fields are optional. If keys is omitted, all permitted keys are returned. See Section 5.1 for the full list of permitted keys.
| Field | Type | Default | Description |
|---|---|---|---|
keys |
string | array | (all allowed) | Keys to include — comma-separated string or JSON array |
pageSize |
number | 1000 |
Max devices per page (capped at 5000) |
page |
number | 0 |
Zero-based page index |
Example — request specific keys:
{
"keys": ["Area", "WellName", "gallons", "1118", "9995", "active", "lastActivityTime"],
"pageSize": 1000,
"page": 0
}
Example — return all allowed keys (empty body):
{}
3.5 Example Request
curl -u "your_username:your_password" \
--request POST \
--url "https://api.dc3control.net/api/devices/latest" \
--header "Content-Type: application/json" \
--data '{"keys": ["Area", "WellName", "gallons", "1118", "9995", "active", "lastActivityTime"]}'
3.6 Example Response
The response is an array — one element per device. The entityId.id is a unique device ID that can be passed to Section 4.
[
{
"entityId": {
"entityType": "DEVICE",
"id": "12345678-123-123-123-12345678"
},
"readAttrs": true,
"readTs": true,
"latest": {
"TIME_SERIES": {
"1118": { "ts": 1728892800000, "value": "29.30712" },
"9995": { "ts": 1728892800000, "value": "3613" },
"gallons": { "ts": 1728892800000, "value": "271.377864448" }
},
"ENTITY_FIELD": {
"name": { "ts": 1729014241371, "value": "864259063692484" },
"type": { "ts": 1729014241371, "value": "TLM" }
},
"ATTRIBUTE": {
"Area": { "ts": 1729008009632, "value": "area ABC" },
"WellName": { "ts": 1715323167435, "value": "Test Well" },
"ChemicalType": { "ts": 1715323571831, "value": "Corrosion Inhibitor" },
"ProductName": { "ts": 1715323284628, "value": "ABCD" },
"InjectionPoint": { "ts": 1714702597504, "value": "ZZ Refining - Sample" },
"active": { "ts": 1728719873056, "value": "true" },
"lastActivityTime": { "ts": 1728892673058, "value": "1728892670622" }
}
},
"timeseries": {},
"aggLatest": {}
},
{
"entityId": {
"entityType": "DEVICE",
"id": "765432-765-765-7654-7654321"
},
"readAttrs": true,
"readTs": true,
"latest": {
"TIME_SERIES": {
"1118": { "ts": 1728979200000, "value": "7.57488" },
"9995": { "ts": 1728979200000, "value": "3619" },
"gallons": { "ts": 1728979200000, "value": "66.43414835200001" }
},
"ENTITY_FIELD": {
"name": { "ts": 1729014241371, "value": "864259063692724" },
"type": { "ts": 1729014241371, "value": "TEK" }
},
"ATTRIBUTE": {
"Area": { "ts": 1729008055908, "value": "Area ZXC" },
"WellName": { "ts": 1727988519648, "value": "Test well2" },
"ChemicalType": { "ts": 1727988550125, "value": "5403" },
"ProductName": { "ts": 1727983340130, "value": "" },
"InjectionPoint": { "ts": 1727988545988, "value": "ABC" },
"active": { "ts": 1727983343034, "value": "true" },
"lastActivityTime": { "ts": 1728979223050, "value": "1728979222796" }
}
},
"timeseries": {},
"aggLatest": {}
}
]
4. Retrieve Historical Device Data
Returns historical time-series data for a specific device. Use the entityId.id from Section 3 as the deviceId.
4.1 Request Method
GET
4.2 Endpoint
https://api.dc3control.net/api/devices/{deviceId}/history
4.3 Request Headers
| Header | Description |
|---|---|
Authorization |
Basic <base64(username:password)> |
4.4 Query Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
keys |
Yes | string | Comma-separated time-series keys (e.g. gallons,1118,9995) |
startTs |
Yes | long | Start timestamp in milliseconds since epoch |
endTs |
Yes | long | End timestamp in milliseconds since epoch |
limit |
No | number | Max data points to return (default 1000) |
Note: Only time-series keys listed in Section 5.1 are accepted. Attribute keys are not valid here.
4.5 Example Request
curl -u "your_username:your_password" \
--request GET \
"https://api.dc3control.net/api/devices/12345678-123-123-123-12345678/history?keys=gallons,1118,9995&startTs=1727812338000&endTs=1727820000000"
4.6 Example Response
{
"1118": [
{ "ts": 1727818200000, "value": "12.283540000000002" },
{ "ts": 1727816400000, "value": "12.283540000000002" },
{ "ts": 1727814600000, "value": "12.244169999999997" },
{ "ts": 1727812800000, "value": "12.283540000000002" }
],
"gallons": [
{ "ts": 1727818200000, "value": "110.83869561600002" },
{ "ts": 1727816400000, "value": "110.83869561600002" },
{ "ts": 1727814600000, "value": "110.46742076799998" },
{ "ts": 1727812800000, "value": "110.83869561600002" }
]
}
5. Available Data Keys
5.1 TIME_SERIES Keys — Full Reference
Table 1, v2.0 — All time-series keys available on the DC3 Control platform.
| Key | Returned For | Description (all values returned as string) |
|---|---|---|
"1100" |
Controllers & TLM | Pump Operating Mode (0=Disabled, 1=Manual, 2=Timed, 3=Auto-Track, 4=Auto-Vol). TLM devices return "TLM" |
"1101" |
Controllers | TIMED Mode: Pump On Time Set Point (seconds) |
"1102" |
Controllers | TIMED Mode: Pump Cycle Time Set Point (seconds) |
"1103" |
Controllers | Master Volume Flow for Auto Tracking Mode (unitless) |
"1104" |
Controllers | Master Volume Timebase for Auto Tracking Mode (2=day, 1=hour, 0=min) |
"1105" |
Controllers | Error Status Bits (0 = no errors; see manual for bit definitions) |
"1106" |
Controllers | Pump Operating On Time (in tenths of seconds) |
"1107" |
Controllers | Pump Operating Cycle Time (in tenths of seconds) |
"1108" |
Controllers & TLM | Ambient Temperature (tenths °F) |
"1110" |
Controllers | Peak Pump Current (mA) |
"1111" |
Controllers | Average Pump Current Calculated (mA) |
"1112" |
Controllers | Pump Constant (quarts/hour) |
"1114" |
Controllers | Target Injection Rate Set Point for Auto Volume Mode (qt/day) |
"1116" |
Controllers | Sensor Analog Input Reading (in. H₂O) |
"1118" |
Controllers & TLM | Tank Level (inches) |
"1120" |
Controllers | Amount pumped this 24 hr contract period (quarts) |
"1122" |
Controllers | Amount pumped previous 24 hr contract period (quarts) |
"1124" |
Controllers | Actual Injection Rate (qt/day) |
"1126" |
Controllers & TLM | Target Injection Rate (qt/day) |
"1128" |
Controllers | Target Ratio for Auto Track Mode (Quarts/Unit Master Volume) |
"1130" |
Controllers | High Temperature Shutoff Point (°F) |
"1150" |
Controllers | Pump Relay state (1=energized, 0=de-energized) |
"1151" |
Controllers | Valve Relay state (1=energized, 0=de-energized) |
"1152" |
Controllers | Pump Calibration Status (0=not in cal, 1=cal in process) |
"9995" |
Controllers & TLM | Supply voltage (millivolts) |
"1178" |
Controllers | Pump Constant (quarts/hour) |
"CSQ" |
Controllers & TLM | Cell Signal Strength |
"gallons" |
Controllers & TLM | Volume of chemical in gallons |
"maxgallons" |
Controllers & TLM | Estimated max tank volume in gallons (based on tank type) |
"amount_to_full" |
Controllers & TLM | Estimated amount to full in gallons (based on tank type and fill height) |
"fillAmount" |
Controllers & TLM | Fill Amount / Delivery |
"varianceRate" |
Controllers & TLM | Percent of Target |
"target_inj_rate_gpd" |
Controllers & TLM | Target Injection Rate (gal/day) |
"Gal1day" |
Controllers & TLM | Estimated usage averaged over 1 day |
"Gal2day" |
Controllers & TLM | Estimated usage averaged over 2 days |
"Gal3day" |
Controllers & TLM | Estimated usage averaged over 3 days |
"Gal7day" |
Controllers & TLM | Estimated usage averaged over 7 days |
"variance" |
Controllers & TLM | Variance % between pumped yesterday and target injection rate |
"daysInv" |
Controllers & TLM | Estimated usage averaged over 7 days |
"pumpUtil" |
Controllers | Pump Utilization % |
"ControllerStatus" |
Controllers | Controller node is "Online" / "Offline" |
"Variance1Day" |
TLM | Variance %, estimated usage averaged over 1 day vs Target |
"Variance7Day" |
TLM | Variance %, estimated usage averaged over 7 days vs Target |
"ContactReason" |
TLM | TLM Contact Reason |
"Ullage" |
TLM | TLM Ullage |
"sonic_rssi" |
TLM | TLM Sonic RSSI |
"sonic_result_code" |
TLM | TLM Sonic Result Code |
"BattLevel" |
TLM | TLM Battery Level |
"gsm_rat" |
TLM | TLM GSM RAT |
"gsm_network_roaming_status" |
TLM | TLM GSM Network Roaming Status |
"RadarStatus" |
TLM | TLM Radar Status |
"BattEnergy" |
TLM | TLM Battery Energy |
"SendAttempts" |
TLM | TLM Send Attempts |
"RadarFirmware" |
TLM | TLM Radar Firmware |
"Orientation" |
TLM | TLM Orientation % |
"NetRSSI" |
TLM | TLM Net RSSI |
5.2 ATTRIBUTE Keys — Full Reference
| Key | Returned For | Description (all values returned as string) |
|---|---|---|
"tanktype" |
Controllers & TLM | Tank Type |
"APINo" |
Controllers & TLM | API Number as entered on the portal |
"Area" |
Controllers & TLM | Area name as entered on the portal |
"ChemicalType" |
Controllers & TLM | Chemical type as entered on the portal |
"CorpID" |
Controllers | Corp ID as entered on the portal |
"CostCenter" |
Controllers & TLM | Cost Center as entered on the portal |
"Customer" |
Controllers & TLM | DC3's "Customer" name |
"FacilityID" |
Controllers & TLM | Facility ID as entered on the portal |
"InjectionPoint" |
Controllers & TLM | Injection Point as entered on the portal |
"LeaseNo" |
Controllers & TLM | Lease No as entered on the portal |
"route" |
Controllers & TLM | Route as entered on the portal |
"Latitude" |
Controllers & TLM | Device location latitude (format: "28.1234") |
"Longitude" |
Controllers & TLM | Device location longitude (format: "-97.4321") |
"ProductName" |
Controllers & TLM | Product Name as entered on the portal |
"SP_HighLevel" |
Controllers & TLM | SP High Level set point |
"SP_HighPress" |
Controllers & TLM | SP High Pressure set point |
"SP_High_Injection_Rate" |
Controllers & TLM | SP High Injection Rate set point |
"SP_LoLoLevel" |
Controllers & TLM | SP LoLo Level set point |
"SP_LowInjectRate" |
Controllers & TLM | SP Low Inject Rate set point |
"SP_LowLevel" |
Controllers & TLM | SP Low Level set point |
"SP_LowPress" |
Controllers & TLM | SP Low Pressure set point |
"SP_LowPumpConstant" |
Controllers & TLM | SP Low Pump Constant set point |
"SP_LowVoltage" |
Controllers & TLM | SP Low Voltage set point |
"SP_MaxCurrent" |
Controllers | SP Max Current set point |
"WellOperator" |
Controllers & TLM | Well Operator as entered on the portal |
"actdate" |
Controllers & TLM | Activation date as entered on the portal |
"active" |
Controllers & TLM | Modem status — "true" / "false" |
"lastActivityTime" |
Controllers & TLM | Last activity time for device (Unix milliseconds) |