Back to getdatapulse.com

DataPulse Connect API Reference

A production-ready reference for the HTTP endpoints exposed by the DataPulse gateway: request contracts, response shapes, rate limits, concurrency, and operational notes.

API version: V1.19 Updated June 25, 2026 Owner: Adams Engineering
Base URL https://<gateway-ip>:8443

The HTTPS address of the DataPulse gateway you are calling.

Auth Header X-DP-Token: <api-key>

Required API key header sent with every request.

Error Shape error / reason / endpoint / detail

Standard JSON structure used by API error responses.

Before You Call

Conventions

All paths are under /dw/. All endpoints require X-DP-Token. Successful responses return endpoint-specific data; error responses use one common JSON format so client applications can handle failures consistently.

URL encoding

Encode query values that contain spaces, slashes, or special characters. For example, send DataPulse Demo as DataPulse%20Demo and file references like Fail/2026/02-17/819_1800374451 with encoded slashes.

Binary responses

Download endpoints return raw file bytes on success, not JSON. Error responses from those same endpoints still use the standard JSON error shape.

Empty results

A valid request with no matching data usually returns 200 OK with an empty array, such as items: [], cameras: [], or tags: [].

Standard error response

All API errors use the same basic fields. error tells you the category, reason gives a stable machine-readable cause, endpoint identifies where it happened, and detail gives a readable explanation for logs or operator screens.

Rate-limit errors also include retry_after and the HTTP Retry-After header, so clients know how long to wait before trying again.

{
  "error": "rate_limited",
  "reason": "bucket_empty",
  "endpoint": "ListCameras",
  "retry_after": 1,
  "detail": "API rate limit exceeded. Retry after 1 second(s)."
}
Security

Authentication

The DataPulse gateway uses an API key to authenticate requests. Send the key in the X-DP-Token header on every API call.

API keys are configured on the gateway and are intended to identify a trusted client or integration. Keep them out of browser code, source control, screenshots, and logs.

Production calls should be made over HTTPS. Requests with a missing or invalid token return the standard JSON error body with error: "unauthorized".

Authenticated request
curl https://<gateway-ip>:8443/dw/ListCameras \
  -H "X-DP-Token: <api-key>"
Your API key

Use the API key provisioned for your client or integration. If a token is rotated, update the caller configuration before retrying requests.

Operations

Gateway Capacity Snapshot

Each endpoint has its own token-bucket rate limit. The numbers below show the worst-case combined load if multiple endpoints are hit at the same time. They are useful for capacity planning, not a target clients should try to sustain.

Combined endpoint burst 435 requests in <1 sec

Total burst allowed if all 14 configured endpoint buckets are hit at once (wildcard fallback excluded).

Sustained ceiling 16.0 requests / sec

Combined refill rate across endpoint buckets during steady traffic (960 req/min).

Auth fallback policy 60 wildcard burst

Default bucket used when an endpoint has no specific policy row.

Client Flow

Common Workflow

Most integrations start by discovering what is available on the gateway, then use those values to query inspection records and image metadata.

1 List cameras

Call ListCameras to find the available camera IDs.

2 Discover jobs and tags

Use ListJobNamesByCamera and ListTagsByCameraAndJobName.

3 Review job performance

Use QueryJobPerformance for dashboard rollups, pass rates, and production summaries.

4 Query inspection records

Use QueryInspectionData when you need record-level inspection details and tags.

5 Check images

Use GetImageInfo with the file_name returned by inspection queries.

6 Download files

Use DownloadImage, DownloadSvg, or audit-log download endpoints when bytes are needed.

Endpoint sequence

A compact view of the typical order clients use when building an integration.

Step Endpoint Use when
1 ListCameras Find available camera IDs and camera IP addresses.
2 ListJobNamesByCamera Discover which jobs have run for a selected camera.
3 ListTagsByCameraAndJobName Discover tag names for a selected camera and job.
4 QueryJobPerformance Build dashboards, pass-rate summaries, and time-based production rollups.
5 QueryInspectionData Fetch record-level inspections and tag/value details.
6 GetImageInfo Check image availability and metadata before downloading bytes.
7 DownloadImage / DownloadSvg Download image or overlay files when the client needs the actual bytes.
8 ListAuditLogFiles / DownloadAuditLogFile List and download raw audit logs for operational review.
Reference

Endpoints

Each endpoint section explains what the route does, how to call it, what fields come back, and which operational limits apply. Start with the discovery endpoints to find cameras, jobs, and tags, then use inspection and image endpoints for record-level data.

ListCameras

GET
Path

/dw/ListCameras

Returns the list of cameras configured on this DataPulse gateway.

Returns all configured cameras on the gateway. Empty camera lists are returned as 200 OK with cameras: [] and rows_selected: 0.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Guardrails

Maximum 100 records per call.

Example request

A minimal call using the required authentication header.

curl https://<gateway-ip>:8443/dw/ListCameras \
  -H "X-DP-Token: <api-key>"
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK

The gateway found configured cameras and returned them in the cameras array.

{
  "cameras": [
    {
      "camera_status": "Disconnected",
      "camera_id": 37,
      "camera_name": "Trade Show Demo",
      "camera_ip_address": "192.168.1.50"
    },
    {
      "camera_status": "Disconnected",
      "camera_id": 38,
      "camera_name": "SecondCamera",
      "camera_ip_address": "192.168.1.39"
    }
  ],
  "rows_selected": 2,
  "edge_device_sn": "MZ00MR0K"
}

200 OK, no cameras

The request succeeded, but this gateway currently has no configured cameras to return.

{
  "cameras": [],
  "rows_selected": 0,
  "edge_device_sn": "MZ00MR0K"
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
cameras[].camera_idINTInternal camera identifier, gateway-local.
cameras[].camera_nameSTRINGOperator-assigned camera name.
cameras[].camera_ip_addressSTRINGCamera IP on the local network.
cameras[].camera_statusSTRINGConnected, Disconnected, or other applicable states.
rows_selectedINTNumber of camera rows returned in this response.
edge_device_snSTRINGSerial number of the gateway.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. Body contains camera list.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Missing or invalid X-DP-Token.
429Rate limit exceeded. Honor Retry-After.
500Internal server error.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

GetEdgeDeviceInfo

GET
Path

/dw/GetEdgeDeviceInfo

Returns identity, network, and build metadata for the local gateway.

Returns the singleton edge-device metadata record: identity, Machine (Ethernet 1) and Connect (Ethernet 2) network blocks (IP, mask, gateway, DNS), production context, and build information. Field order is fixed in v1.19 for readability; clients must key on field names.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Guardrails

Single edge-device record per call.

Example request

A minimal call using the required authentication header.

curl https://<gateway-ip>:8443/dw/GetEdgeDeviceInfo \
  -H "X-DP-Token: <api-key>"
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK

The gateway returned its current identity, network, and build metadata.

{
  "edge_device": {
    "serial_number": "MZ00MR0K",
    "device_name": "DataPulse Edge Device",
    "timezone_name": "UTC",
    "adapter_name": "Ethernet 1",
    "mac_address": "74:5D:22:B9:17:BD",
    "ip_address": "10.1.20.51",
    "subnet_mask": "255.255.255.0",
    "network_gateway": "",
    "preferred_dns": "",
    "alternate_dns": "",
    "adapter_name_eth2": "Ethernet 2",
    "mac_address_eth2": "74:5D:22:B9:17:BE",
    "ip_address_eth2": "10.50.0.10",
    "subnet_mask_eth2": "255.255.255.0",
    "network_gateway_eth2": "10.50.0.1",
    "preferred_dns_eth2": "10.50.0.1",
    "alternate_dns_eth2": "",
    "production_area": "",
    "machine_name": "",
    "last_seen_utc": "2026-07-27T00:40:08Z",
    "created_utc": "2026-07-01T14:02:02Z",
    "updated_utc": "2026-07-27T00:40:08Z",
    "system_build": "25.01.12",
    "datapulse_version": "1.19",
    "build_date": "07-09-26"
  }
}

400 Bad Request

The request was rejected because the API token was missing or invalid.

{
  "error": "unauthorized",
  "reason": "invalid_or_missing_token",
  "endpoint": "GetEdgeDeviceInfo",
  "detail": "Authorization failed: invalid or missing X-DP-Token header."
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
edge_device.serial_numberSTRINGHardware or gateway serial number.
edge_device.device_nameSTRINGOperator-facing device name.
edge_device.timezone_nameSTRINGIANA timezone such as America/New_York or UTC.
edge_device.adapter_nameSTRINGWindows alias for Machine / Ethernet 1 (e.g. Ethernet 1).
edge_device.mac_addressSTRINGMachine MAC address.
edge_device.ip_addressSTRINGMachine / Ethernet 1 IPv4 (operator HMI :8080).
edge_device.subnet_maskSTRINGMachine subnet mask (empty string if unset).
edge_device.network_gatewaySTRINGMachine default gateway (often empty on camera LAN).
edge_device.preferred_dnsSTRINGMachine preferred DNS.
edge_device.alternate_dnsSTRINGMachine alternate DNS.
edge_device.adapter_name_eth2STRINGWindows alias for Connect / Ethernet 2.
edge_device.mac_address_eth2STRINGConnect MAC address.
edge_device.ip_address_eth2STRINGConnect / Ethernet 2 IPv4 (API :8443). Empty until Connect is configured.
edge_device.subnet_mask_eth2STRINGConnect subnet mask.
edge_device.network_gateway_eth2STRINGConnect default gateway.
edge_device.preferred_dns_eth2STRINGConnect preferred DNS.
edge_device.alternate_dns_eth2STRINGConnect alternate DNS.
edge_device.production_areaSTRINGProduction area label.
edge_device.machine_nameSTRINGMachine or line identifier.
edge_device.last_seen_utcSTRINGLast activity timestamp in RFC 3339 UTC format.
edge_device.created_utcSTRINGRecord creation timestamp in RFC 3339 UTC format.
edge_device.updated_utcSTRINGRecord last update timestamp in RFC 3339 UTC format.
edge_device.system_buildSTRINGGateway platform build identifier.
edge_device.datapulse_versionSTRINGDataPulse application version.
edge_device.build_dateSTRINGApplication build date string.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. Body contains edge_device object.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Missing or invalid X-DP-Token.
429Rate limit exceeded. Honor Retry-After.
500Internal server error.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • device_key, device_description, and plant_location are internal or unused and are not returned.
  • updated_utc, last_seen_utc, and created_utc now use RFC 3339 UTC format with a trailing Z, for example 2026-06-09T20:42:16Z.

GetCameraById

GET
Path

/dw/GetCameraById?CameraId=<int>

Looks up one camera by its gateway-local camera identifier.

Returns the standard camera response envelope filtered to a single camera_id. Unknown camera IDs are treated as a no-match data condition, not an error.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Query parameters CameraId=<int>

URL values used to narrow this request.

/dw/GetCameraById?CameraId=37
Guardrails

Returns at most one row. Unknown CameraId returns cameras: [] with rows_selected: 0.

Example request

A minimal call using the required authentication header.

curl "https://<gateway-ip>:8443/dw/GetCameraById?CameraId=37" \
  -H "X-DP-Token: <api-key>"

Query parameters

URL parameters accepted by this endpoint.

FieldTypeDescription
CameraIdINTRequired. Gateway-local camera identifier. Unknown IDs return 200 with an empty cameras array.
Query examples

Common URL shapes for this endpoint. Values with spaces or slashes should be URL-encoded.

Lookup camera 37

/dw/GetCameraById?CameraId=37

No-match lookup

/dw/GetCameraById?CameraId=999999
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK, match

The requested CameraId matched one configured camera, so the cameras array contains one item.

{
  "cameras": [
    {
      "camera_status": "Disconnected",
      "camera_id": 37,
      "camera_name": "Trade Show Demo",
      "camera_ip_address": "192.168.1.50"
    }
  ],
  "rows_selected": 1,
  "edge_device_sn": "MZ00MR0K"
}

200 OK, no match

The request was valid, but no camera matched the supplied CameraId.

{
  "cameras": [],
  "rows_selected": 0,
  "edge_device_sn": "MZ00MR0K"
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
cameras[].camera_idINTInternal camera identifier, gateway-local.
cameras[].camera_nameSTRINGOperator-assigned camera name.
cameras[].camera_ip_addressSTRINGCamera IP on the local network.
cameras[].camera_statusSTRINGConnected, Disconnected, or other applicable states.
rows_selectedINT1 on match or 0 when no row matches.
edge_device_snSTRINGSerial number of the gateway.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. cameras[] length is 0 or 1.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Missing or invalid X-DP-Token.
429Rate limit exceeded. Honor Retry-After.
500Internal server error.
Rate limit

This endpoint allows a short burst of 60 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • A missing or unknown CameraId returns the standard no-match response with zero rows.

QueryInspectionData

POST
Path

/dw/QueryInspectionData

Queries grouped inspection records and their tag/value results.

Returns grouped inspection records with optional filters, tag-value predicates, browse mode, and cursor/sync mode.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Guardrails

Maximum 99 records per call. number_of_records defaults to 25 and is clamped to 1..99. Browse mode never emits a next_cursor; cursor mode is enabled with since_id > 0.

Example request

A minimal call using the required authentication header.

curl https://<gateway-ip>:8443/dw/QueryInspectionData \
  -H "X-DP-Token: <api-key>" \
  -H "Content-Type: application/json" \
  -d '{"camera_id":37,"dp_inspection_result":"Fail","number_of_records":10}'

Request filters

Optional request-body fields that narrow or page inspection results.

FieldTypeDescription
number_of_recordsINTOptional. Page size. Defaults to 25 and is clamped to 1..99.
timestamp_sort_filterSTRINGOptional. ASC or DESC in browse mode. Defaults to DESC.
since_idINTOptional. Enables cursor/sync mode when greater than 0.
camera_idINTOptional. 0 or omitted means any camera; otherwise exact camera match.
job_nameSTRINGOptional. All or omitted means any job; otherwise exact Data.Job_Name match.
dp_inspection_resultSTRINGOptional. All, Pass, or Fail. Invalid labels return zero rows rather than 400.
file_nameSTRINGOptional (v1.17+). Exact match on Data.File_Name. Returns at most one inspection. Useful for fetching a specific record by its file reference.
start_ts_utcINT | STRINGOptional inclusive lower timestamp bound. Accepts epoch ms, ISO, or Data.Timestamp format.
end_ts_utcINT | STRINGOptional inclusive upper timestamp bound. Same accepted formats as start_ts_utc.
tag_value_filterARRAY | STRINGOptional AND-combined tag filters. Can be an array or a JSON-encoded string.
Filter examples

Common request bodies for filtering inspections. These examples can be sent as the POST JSON body.

Default browse request

An empty request body returns up to 25 of the most recent grouped inspections in browse mode. The default sort is newest first and next_cursor remains null.

{}

Camera + result filter

{
  "camera_id": 37,
  "dp_inspection_result": "Fail",
  "number_of_records": 10
}

Camera + job filter

{
  "camera_id": 37,
  "job_name": "DataPulse Demo",
  "number_of_records": 25
}

Time window

{
  "start_ts_utc": "2026-02-17T18:00:00Z",
  "end_ts_utc": "2026-02-17T19:00:00Z",
  "timestamp_sort_filter": "ASC"
}

Tag value filter

{
  "camera_id": 37,
  "job_name": "DataPulse Demo",
  "tag_value_filter": [
    { "tag": "Port Found", "op": "=", "value": "1" },
    { "tag": "Threshold", "op": ">=", "value": "75" }
  ]
}

Cursor / sync mode

{
  "since_id": 3123,
  "number_of_records": 99,
  "dp_inspection_result": "Fail"
}

Exact file lookup (v1.17+)

Use file_name to fetch one specific inspection. Combine with camera_id and job_name for safety. Returns rows_returned: 1 when found.

{
  "file_name": "Pass/2026/02-17/198_1706390741",
  "camera_id": 37,
  "job_name": "DataPulse Demo"
}
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK, browse mode

Browse mode returns a page of inspections sorted newest-first. Real gateway response (camera 37, DataPulse Demo job). Timestamps use RFC 3339 UTC with milliseconds and trailing Z (v1.17+).

{
  "rows_returned": 1,
  "more_available": true,
  "next_cursor": null,
  "edge_device_sn": "MZ00MR0K",
  "items": [
    {
      "timestamp_utc": "2026-02-17T17:06:38.978Z",
      "camera_id": 37,
      "camera_name": "Trade Show Demo",
      "camera_ip_address": "192.168.1.50",
      "job_name": "DataPulse Demo",
      "file_name": "Pass/2026/02-17/198_1706390741",
      "dp_inspection_result": "Pass",
      "start_id": 424,
      "end_id": 428,
      "tags": {
        "Port Found": "1",
        "Distance": "6.6 mm",
        "Active Bag Size": "500 mL",
        "Threshold": "15",
        "Result": "1"
      }
    }
  ]
}

200 OK, caught-up cursor

Cursor mode is used for sync/polling. This response means the client is caught up and there are no newer matching inspections after the supplied since_id.

{
  "rows_returned": 0,
  "more_available": false,
  "next_cursor": null,
  "edge_device_sn": "MZ00MR0K",
  "items": []
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
rows_returnedINTNumber of inspection items returned in this response, 0..99.
more_availableBOOLTrue when more matching rows exist beyond this page.
next_cursorOBJECT | nullCursor object { since_id } only in cursor mode when more rows are available.
edge_device_snSTRINGSerial number of the gateway.
items[].timestamp_utcSTRINGInspection timestamp in RFC 3339 UTC with milliseconds, e.g. 2026-02-17T18:00:37.450Z (v1.17+).
items[].camera_idINTCamera identifier.
items[].camera_nameSTRINGCamera display name.
items[].camera_ip_addressSTRINGCamera IP address.
items[].job_nameSTRINGJob/program name from Data.Job_Name.
items[].file_nameSTRINGImage/file reference from Data.File_Name.
items[].dp_inspection_resultSTRINGDerived from file_name: Pass, Fail, or Unknown.
items[].start_idINTMIN(Data.ID) across the grouped inspection rows.
items[].end_idINTMAX(Data.ID) across the grouped inspection rows; used as sync cursor.
items[].tagsOBJECTMap of tag_name to tag_value strings.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. Body contains rows_returned, more_available, next_cursor, edge_device_sn, and items[].

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Validation or auth failure. reason is one of: invalid_or_missing_token, empty_body, malformed_body, malformed_tag_filter, malformed_timestamp, incompatible_sort, unsupported_tool, missing_args.
429Rate limit exceeded. Honor Retry-After.
500Internal server error.
Rate limit

This endpoint allows a short burst of 40 req in <1 sec and a steady rate of 120 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • All request fields are optional; {} returns the 25 most recent inspections.
  • since_id > 0 enables cursor/sync mode and forces ascending order by end_id.
  • tag_value_filter accepts an array or a JSON-encoded string.
  • file_name (v1.17+) is an exact match filter that returns at most one inspection. Combine with camera_id or job_name for safety.
  • items[].timestamp_utc now emits RFC 3339 UTC with milliseconds and trailing Z since v1.17.

ListJobNamesByCamera

GET
Path

/dw/ListJobNamesByCamera?CameraId=<int>

Lists the jobs observed for a selected camera.

Returns distinct job_name values observed for one camera. This endpoint powers job filter pickers without a full inspection query.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Query parameters CameraId=<int>

URL values used to narrow this request.

/dw/ListJobNamesByCamera?CameraId=37
Guardrails

Maximum 99 distinct job names per response. more_available appears only as a truncation warning; there is no cursor for this endpoint.

Example request

A minimal call using the required authentication header.

curl "https://<gateway-ip>:8443/dw/ListJobNamesByCamera?CameraId=37" \
  -H "X-DP-Token: <api-key>"

Query parameters

URL parameters accepted by this endpoint.

FieldTypeDescription
CameraIdINTRequired. Positive camera identifier used to find distinct job names observed for that camera.
Query examples

Common URL shapes for this endpoint. Values with spaces or slashes should be URL-encoded.

List jobs for camera 37

/dw/ListJobNamesByCamera?CameraId=37

Unknown camera returns empty list

/dw/ListJobNamesByCamera?CameraId=999999
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK, with jobs

The selected camera has inspection data for these job names.

{
  "job_names": [
    "DataPulse Demo",
    "DataPulse Job 2"
  ],
  "camera_id": 37,
  "rows_selected": 2,
  "edge_device_sn": "MZ00MR0K"
}

200 OK, no jobs

The request was valid, but no job names were found for the supplied camera.

{
  "job_names": [],
  "camera_id": 99,
  "rows_selected": 0,
  "edge_device_sn": "MZ00MR0K"
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
rows_selectedINTNumber of distinct job names returned.
camera_idINTEcho of the validated CameraId query parameter.
job_namesARRAYDistinct Data.Job_Name values sorted ascending.
edge_device_snSTRINGSerial number of the gateway.
more_availableBOOLOptional. Present only when the response is truncated at 99.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. job_names[] length is 0..99.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Missing/invalid token, missing_camera_id, or invalid_camera_id.
429Rate limit exceeded. Honor Retry-After.
500Internal error.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • CameraId is strictly validated as a positive integer.
  • Unknown cameras and cameras with no Data rows return 200 with job_names: [].

ListTagsByCameraAndJobName

GET
Path

/dw/ListTagsByCameraAndJobName?CameraId=<int>&JobName=<string>

Lists the tags emitted by a selected camera/job pair.

Returns distinct tag names for one camera and job pair. This is the schema-discovery step after selecting a camera and job.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Query parameters CameraId=<int> JobName=<string>

URL values used to narrow this request.

/dw/ListTagsByCameraAndJobName?CameraId=37&JobName=DataPulse%20Demo
Guardrails

Maximum 20 distinct tags per response. more_available indicates a camera-side data anomaly, not a pagination path.

Example request

A minimal call using the required authentication header.

curl "https://<gateway-ip>:8443/dw/ListTagsByCameraAndJobName?CameraId=37&JobName=DataPulse%20Demo" \
  -H "X-DP-Token: <api-key>"

Query parameters

URL parameters accepted by this endpoint.

FieldTypeDescription
CameraIdINTRequired. Positive camera identifier.
JobNameSTRINGRequired. Exact job name returned by ListJobNamesByCamera. URL-encode spaces and special characters.
Query examples

Common URL shapes for this endpoint. Values with spaces or slashes should be URL-encoded.

List tags for camera/job

/dw/ListTagsByCameraAndJobName?CameraId=37&JobName=DataPulse%20Demo

Unknown job returns empty tags

/dw/ListTagsByCameraAndJobName?CameraId=37&JobName=ThisJobDoesNotExist
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK, with tags

The selected camera and job pair has these tag names available.

{
  "job_name": "DataPulse Demo",
  "tags": [
    "Active Bag Size",
    "Distance",
    "Port Found",
    "Result",
    "Threshold"
  ],
  "camera_id": 37,
  "rows_selected": 5,
  "edge_device_sn": "MZ00MR0K"
}

200 OK, no tags

The request was valid, but no tags were found for the supplied camera/job pair.

{
  "job_name": "ThisJobDoesNotExist",
  "tags": [],
  "camera_id": 37,
  "rows_selected": 0,
  "edge_device_sn": "MZ00MR0K"
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
rows_selectedINTNumber of distinct tag names returned.
camera_idINTEcho of validated CameraId.
job_nameSTRINGEcho of validated JobName.
tagsARRAYDistinct Data.Tag values sorted ascending.
edge_device_snSTRINGSerial number of the gateway.
more_availableBOOLOptional. Present only when more than 20 tags exist.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. tags[] length is 0..20.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Missing/invalid token, CameraId, or JobName.
429Rate limit exceeded. Honor Retry-After.
500Internal error.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • Pass the exact JobName returned by ListJobNamesByCamera.
  • CameraId is validated before JobName.
  • JobName is case-sensitive and capped at 128 bytes.

GetImageInfo

GET
Path

/dw/GetImageInfo?FileName=<file_name>

Checks whether an inspection image exists and returns its metadata.

Checks whether an inspection image exists on disk and returns lightweight metadata without downloading the image bytes.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Query parameters FileName=<string>

URL values used to narrow this request.

/dw/GetImageInfo?FileName=Fail%2F2026%2F02-17%2F816_1800353701
Guardrails

One image reference per call. Probes a bounded set of image extensions and one SVG companion file. No X-Rows-Returned header.

Example request

A minimal call using the required authentication header.

curl "https://<gateway-ip>:8443/dw/GetImageInfo?FileName=Fail%2F2026%2F02-17%2F816_1800353701" \
  -H "X-DP-Token: <api-key>"

Query parameters

URL parameters accepted by this endpoint.

FieldTypeDescription
FileNameSTRINGRequired. Extension-less image reference copied from QueryInspectionData items[].file_name. URL-encode slashes when sending it as a query parameter.
Query examples

Common URL shapes for this endpoint. Values with spaces or slashes should be URL-encoded.

Check image metadata

/dw/GetImageInfo?FileName=Fail%2F2026%2F02-17%2F816_1800353701

Clean miss example

/dw/GetImageInfo?FileName=Fail%2F2099%2F12-31%2F999_9999999999
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK, image metadata

The image exists on disk, and the gateway returned metadata without downloading the image bytes.

{
  "file_name": "Fail/2026/02-17/816_1800353701",
  "image_exists": true,
  "record_exists": true,
  "inspection_timestamp_utc": "2026-02-17T18:00:35.382Z",
  "content_type": "image/bmp",
  "file_size_bytes": 849128,
  "svg_exists": false,
  "edge_device_sn": "MZ00MR0K"
}

404 Not Found

No image file or inspection record exists for the supplied FileName.

{
  "error": "not_found",
  "reason": "image_not_found",
  "endpoint": "GetImageInfo",
  "detail": "No image or inspection record found for FileName 'Fail/2099/12-31/999_9999999999'."
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
file_nameSTRINGEcho of the FileName query parameter.
image_existsBOOLTrue on every 200 response.
record_existsBOOLTrue when Data rows exist for this file_name.
inspection_timestamp_utcSTRING | nullMAX(Data.Timestamp) in RFC 3339 UTC with milliseconds, e.g. 2026-02-17T18:00:35.382Z (v1.17+), or null for orphan images.
content_typeSTRINGimage/bmp, image/jpeg, or image/png.
file_size_bytesINTImage size on disk.
svg_existsBOOLWhether a same-base SVG companion exists.
edge_device_snSTRINGSerial number of the gateway.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Image exists. Body contains the 8-field metadata envelope.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Missing/invalid token or FileName.
404No image and no inspection record found.
410Inspection record exists, but image bytes are unavailable.
429Rate limit exceeded. Honor Retry-After.
500Internal error.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • FileName must be copied from QueryInspectionData items[].file_name.
  • 200 means image bytes exist. record_exists distinguishes clean image vs orphan image.
  • 404 means neither image nor Data record exists; 410 means Data record exists but image is unavailable.

DownloadImage

GET
Path

/dw/DownloadImage?FileName=<file_name>

Downloads the raw inspection image bytes for a FileName.

Transfers the raw BMP, JPEG, or PNG image for a valid FileName. This endpoint returns binary image bytes, not JSON, on success.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Query parameters FileName=<string>

URL values used to narrow this request.

/dw/DownloadImage?FileName=Fail%2F2026%2F02-17%2F816_1800353701
Guardrails

One image transferred per call. Success responses are binary bytes; JSON is returned only for errors. Large downloads should be paced by the client.

Example request

A minimal call using the required authentication header.

curl "https://<gateway-ip>:8443/dw/DownloadImage?FileName=Fail%2F2026%2F02-17%2F816_1800353701" \
  -H "X-DP-Token: <api-key>" \
  --output inspection-image.bmp

Query parameters

URL parameters accepted by this endpoint.

FieldTypeDescription
FileNameSTRINGRequired. Extension-less image reference copied from QueryInspectionData items[].file_name or GetImageInfo.file_name. URL-encode slashes when sending it as a query parameter.
Query examples

Common URL shapes for this endpoint. Values with spaces or slashes should be URL-encoded.

Download image bytes

/dw/DownloadImage?FileName=Fail%2F2026%2F02-17%2F816_1800353701

Clean miss example

/dw/DownloadImage?FileName=Fail%2F2099%2F12-31%2F999_9999999999
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK, image download

The gateway returns image bytes with file-download headers instead of a JSON body.

HTTP/1.1 200 OK
Content-Type: image/bmp
Content-Length: 5014632
Content-Disposition: attachment; filename="819_1800374451.bmp"
X-Edge-Device-SN: MZ00MR0K
Cache-Control: public, max-age=31536000, immutable

[5014632 bytes of raw BMP data]

404 Not Found

No image file or inspection record exists for the supplied FileName.

{
  "error": "not_found",
  "reason": "image_not_found",
  "endpoint": "DownloadImage",
  "detail": "No image or inspection record found for FileName 'Fail/2099/12-31/999_9999999999'."
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
Content-TypeHEADERimage/bmp, image/jpeg, or image/png.
Content-LengthHEADERExact byte count of the image response body.
Content-DispositionHEADERattachment filename for the downloaded image.
X-Edge-Device-SNHEADERSerial number of the gateway that served the binary response.
Cache-ControlHEADERImages are immutable while the FileName exists; cacheable for long periods.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. Body is raw image bytes.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Missing/invalid token or FileName.
404No image and no inspection record found.
410Inspection record exists, but image bytes are unavailable.
429Rate limit exceeded. Honor Retry-After.
500Internal error while resolving or reading the file.
Rate limit

This endpoint allows a short burst of 5 req in <1 sec and a steady rate of 120 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • Call GetImageInfo first if the client needs file size, content type, timestamp, or record_exists before downloading.
  • The response body is raw image bytes; do not expect a JSON envelope on 200.
  • The gateway does not include SVG data in this response. Use DownloadSvg separately for overlays.

DownloadSvg

GET
Path

/dw/DownloadSvg?FileName=<file_name>

Downloads the SVG overlay companion for a FileName.

Transfers the SVG overlay bytes for a valid FileName. The image and SVG are separate resources; clients compose them if an overlay view is needed.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Query parameters FileName=<string>

URL values used to narrow this request.

/dw/DownloadSvg?FileName=Pass%2F2026%2F02-17%2F198_1706390741
Guardrails

One SVG transferred per call. Success responses are raw SVG XML bytes; JSON is returned only for errors.

Example request

A minimal call using the required authentication header.

curl "https://<gateway-ip>:8443/dw/DownloadSvg?FileName=Pass%2F2026%2F02-17%2F198_1706390741" \
  -H "X-DP-Token: <api-key>" \
  --output overlay.svg

Query parameters

URL parameters accepted by this endpoint.

FieldTypeDescription
FileNameSTRINGRequired. Extension-less image reference copied from QueryInspectionData or GetImageInfo. URL-encode slashes.
Query examples

Common URL shapes for this endpoint. Values with spaces or slashes should be URL-encoded.

Download SVG overlay

/dw/DownloadSvg?FileName=Pass%2F2026%2F02-17%2F198_1706390741

Missing SVG example

/dw/DownloadSvg?FileName=Fail%2F2099%2F12-31%2F999_9999999999
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK, SVG download

The gateway returns SVG XML bytes with file-download headers.

HTTP/1.1 200 OK
Content-Type: image/svg+xml
Content-Length: 24816
Content-Disposition: attachment; filename="198_1706390741.svg"
X-Edge-Device-SN: MZ00MR0K
Cache-Control: public, max-age=31536000, immutable

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2592 1944">
  <!-- overlay markup -->
</svg>

404 Not Found

No SVG overlay exists for the supplied FileName, or the inspection is no longer available.

{
  "error": "not_found",
  "reason": "svg_not_found",
  "endpoint": "DownloadSvg",
  "detail": "No SVG or inspection record found for FileName 'Fail/2099/12-31/999_9999999999'."
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
Content-TypeHEADERAlways image/svg+xml on success.
Content-LengthHEADERExact byte count of the SVG response body.
Content-DispositionHEADERattachment filename for the downloaded SVG.
X-Edge-Device-SNHEADERSerial number of the gateway that served the binary response.
Cache-ControlHEADERSVG bytes are immutable while the FileName exists.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. Body is raw SVG XML.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Missing/invalid token or FileName.
404SVG not found or inspection not found.
429Rate limit exceeded. Honor Retry-After.
500Internal error while resolving or reading the file.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • Not every inspection has an SVG overlay. Missing SVGs return 404 with reason svg_not_found.
  • Use GetImageInfo first if the client needs to know whether svg_exists is true.
  • The gateway does not render SVG onto the image; clients are responsible for overlay display.

ListAuditLogFiles

POST
Path

/dw/ListAuditLogFiles

Lists audit log files available on the gateway.

Returns metadata for audit log text files stored on the gateway. Use the returned audit_file_name with DownloadAuditLogFile to download the raw log text.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Guardrails

Maximum 99 audit-file rows per call. camera_id and camera_ip_address are mutually exclusive filters.

Example request

A minimal call using the required authentication header.

curl https://<gateway-ip>:8443/dw/ListAuditLogFiles \
  -H "X-DP-Token: <api-key>" \
  -H "Content-Type: application/json" \
  -d '{"start_utc":"2025-12-08","end_utc":"2025-12-10","camera_id":37,"limit":10}'

Request filters

Optional request-body fields that narrow or page inspection results.

FieldTypeDescription
start_utcINT | STRINGOptional inclusive date lower bound. Accepts epoch ms, ISO timestamp, or YYYY-MM-DD.
end_utcINT | STRINGOptional inclusive date upper bound. Same accepted formats as start_utc.
limitINTOptional. Defaults to 25 and is clamped to 1..99.
camera_idINTOptional. Positive camera identifier. Mutually exclusive with camera_ip_address.
camera_ip_addressSTRINGOptional IPv4 address. Useful for historical audit files. Mutually exclusive with camera_id.
Filter examples

Common request bodies for filtering inspections. These examples can be sent as the POST JSON body.

Default audit file list

Returns up to 25 recent audit files across cameras and dates.

{}

Date range + camera

{
  "start_utc": "2025-12-08",
  "end_utc": "2025-12-10",
  "camera_id": 37,
  "limit": 10
}
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK, audit files

The gateway found audit log files matching the requested filters.

{
  "rows_selected": 1,
  "items": [
    {
      "audit_file_name": "2025-12-09/192.168.1.50_2025-12-09.txt",
      "camera_ip_address": "192.168.1.50",
      "camera_id": 37,
      "file_date": "2025-12-09",
      "file_size_bytes": 211204,
      "last_modified_utc": "2025-12-09T23:59:58.842Z"
    }
  ],
  "edge_device_sn": "MZ00MR0K"
}

200 OK, no match

The request was valid, but no audit log files matched the filters.

{
  "rows_selected": 0,
  "items": [],
  "edge_device_sn": "MZ00MR0K"
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
rows_selectedINTNumber of audit file rows returned.
more_availableBOOLOptional. Present only when the response was truncated by limit.
items[].audit_file_nameSTRINGIdentifier to pass to DownloadAuditLogFile.
items[].camera_ip_addressSTRINGSource IP parsed from the audit log filename.
items[].camera_idINT | nullCurrent camera ID resolved from the camera IP, or null for orphan IPs.
items[].file_dateSTRINGAudit file date in YYYY-MM-DD format.
items[].file_size_bytesINTFile size at enumeration time.
items[].last_modified_utcSTRINGLast modified timestamp in UTC.
edge_device_snSTRINGSerial number of the gateway.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. Body contains audit file metadata rows.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Invalid auth, malformed body, timestamp, camera filter conflict, or invalid camera filter.
429Rate limit exceeded. Honor Retry-After.
500Internal error while enumerating audit files.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • This endpoint lists files only; it does not return raw audit log text.
  • Pass items[].audit_file_name to DownloadAuditLogFile to download the file.
  • camera_id may be null when the audit file belongs to an IP that no longer maps to a current camera.

DownloadAuditLogFile

GET
Path

/dw/DownloadAuditLogFile?AuditFileName=<audit_file_name>

Downloads a raw audit log text file.

Transfers the raw UTF-8 audit log text file identified by an audit_file_name returned from ListAuditLogFiles.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Query parameters AuditFileName=<string>

URL values used to narrow this request.

/dw/DownloadAuditLogFile?AuditFileName=2025-12-09%2F192.168.1.50_2025-12-09.txt
Guardrails

One audit file downloaded per call. Success response is raw text bytes; JSON is returned only for errors.

Example request

A minimal call using the required authentication header.

curl "https://<gateway-ip>:8443/dw/DownloadAuditLogFile?AuditFileName=2025-12-09%2F192.168.1.50_2025-12-09.txt" \
  -H "X-DP-Token: <api-key>" \
  --output audit-log.txt

Query parameters

URL parameters accepted by this endpoint.

FieldTypeDescription
AuditFileNameSTRINGRequired. Value copied from ListAuditLogFiles items[].audit_file_name. URL-encode the slash when passing it in the query string.
Query examples

Common URL shapes for this endpoint. Values with spaces or slashes should be URL-encoded.

Download audit file

/dw/DownloadAuditLogFile?AuditFileName=2025-12-09%2F192.168.1.50_2025-12-09.txt
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK, audit log download

The gateway returns raw UTF-8 audit log text with file-download headers.

HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Content-Length: 211204
Content-Disposition: attachment; filename="192.168.1.50_2025-12-09.txt"
X-Edge-Device-SN: MZ00MR0K
Cache-Control: public, max-age=31536000, immutable

<211204 bytes of UTF-8 RFC5424 syslog records>

404 Not Found

No audit log file exists for the supplied AuditFileName.

{
  "error": "not_found",
  "reason": "audit_file_not_found",
  "endpoint": "DownloadAuditLogFile",
  "detail": "No audit file found at audit_file_name '2099-12-31/192.168.99.99_2099-12-31.txt'."
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
Content-TypeHEADERtext/plain; charset=utf-8.
Content-LengthHEADERExact byte count of the audit log response body.
Content-DispositionHEADERAttachment filename for the downloaded .txt file.
X-Edge-Device-SNHEADERSerial number of the gateway that served the response.
Cache-ControlHEADERno-store for today's file; immutable cache for past-day files.
X-Audit-File-SnapshotHEADERpartial on today's actively-written file only.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. Body is raw audit log text.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Missing/invalid token or AuditFileName.
404Audit file does not exist on disk.
429Rate limit exceeded. Honor Retry-After.
503Audit file exists but is temporarily locked. Retry after Retry-After.
500Internal error while resolving or reading the file.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • Use ListAuditLogFiles first to discover valid AuditFileName values.
  • Today's active file is served as a snapshot and may include X-Audit-File-Snapshot: partial.
  • Past-day files are immutable and can be cached.

QueryJobPerformance

POST
Path

/dw/QueryJobPerformance

Returns job-level performance rollups for dashboards and reports.

Returns aggregated job performance counters, including total inspections, passes, fails, pass rate, and first/last inspection timestamps.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Guardrails

Maximum 99 rollup rows per call. camera_id and camera_ip_address are mutually exclusive. period cannot be combined with custom start_utc/end_utc filters.

Example request

A minimal call using the required authentication header.

curl https://<gateway-ip>:8443/dw/QueryJobPerformance \
  -H "X-DP-Token: <api-key>" \
  -H "Content-Type: application/json" \
  -d '{"period":"last_24_hours","camera_id":37,"job_name":"DataPulse Demo","aggregation_level":"hour","limit":3}'

Request filters

Optional request-body fields that narrow or page inspection results.

FieldTypeDescription
periodSTRINGOptional predefined time window. Defaults to last_24_hours. Mutually exclusive with start_utc/end_utc.
start_utcINT | STRINGOptional custom lower bound. Accepts epoch ms, ISO timestamp, or YYYY-MM-DD.
end_utcINT | STRINGOptional custom upper bound. Same accepted formats as start_utc.
aggregation_levelSTRINGOptional. hour, day, month, or all. Defaults to hour.
limitINTOptional. Defaults to 25 and is clamped to 1..99.
camera_idINTOptional positive camera identifier. Mutually exclusive with camera_ip_address.
camera_ip_addressSTRINGOptional IPv4 address. Mutually exclusive with camera_id.
job_nameSTRINGOptional job name filter. Matched case-insensitively via server-side lowercase normalization.
Filter examples

Common request bodies for filtering inspections. These examples can be sent as the POST JSON body.

Default dashboard request

Returns the last 24 hours at hourly grain across all cameras and jobs.

{}

Last 24 hours for one camera/job

{
  "period": "last_24_hours",
  "camera_id": 37,
  "job_name": "DataPulse Demo",
  "aggregation_level": "hour",
  "limit": 24
}

Seven-day pass-rate summary

{
  "period": "last_7_days",
  "camera_id": 37,
  "job_name": "DataPulse Demo",
  "aggregation_level": "all"
}

Custom daily trend

{
  "start_utc": "2026-06-01",
  "end_utc": "2026-06-09",
  "aggregation_level": "day",
  "limit": 99
}

Aggregation levels

Controls how job performance rows are grouped in time. Use finer levels for trend charts and all for summary cards.

LevelMeaningBest for
hourOne row per hour for each camera/job.Live dashboards, hour-over-hour comparisons, shift detail.
dayCombines hourly rows into one row per day.Daily reports and week-over-week trends.
monthCombines hourly rows into one row per month.Monthly reporting and longer-term comparisons.
allCollapses the full selected window into one row per camera/job. bucket_utc is null.Single KPI cards such as pass rate over the last 7 or 30 days.

Periods

Predefined time windows for job performance queries. Use these instead of custom start_utc / end_utc when a standard dashboard window is enough.

PeriodResolved windowBest for
last_hourRolling 1-hour window ending now.Most recent hour of production.
current_hourFrom the top of the current UTC hour through now.Current-hour live status.
last_24_hoursRolling 24-hour window ending now.Default dashboard view.
current_day_utcFrom UTC midnight today through now.Today’s production in UTC.
last_7_daysRolling 7-day window ending now.Weekly trend or recent comparison.
last_30_daysRolling 30-day window ending now.Monthly trend and longer review.
current_month_utcFrom the first day of the current UTC month through now.Month-to-date reporting.
last_yearRolling 365-day window ending now.Year-scale comparison.
all_timeNo time filter, bounded by gateway retention.All retained job performance data.
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK, hourly job performance

The gateway returned hourly rollup rows for the requested camera and job.

{
  "rows_selected": 3,
  "items": [
    {
      "camera_id": 37,
      "camera_ip_address": "192.168.1.50",
      "job_name": "datapulse demo",
      "bucket_utc": "2026-06-02T19:00:00Z",
      "aggregation_level": "hour",
      "total_inspections": 412,
      "total_passes": 389,
      "total_fails": 23,
      "pass_rate": 0.9442,
      "first_inspection_utc": "2026-06-02T19:00:08.117Z",
      "last_inspection_utc": "2026-06-02T19:42:51.903Z"
    }
  ],
  "filter": {
    "aggregation_level": "hour",
    "period": "last_24_hours",
    "start_utc": "2026-06-01T20:00:00Z",
    "end_utc": "2026-06-02T20:00:00Z",
    "camera_id": 37,
    "camera_ip_address": "192.168.1.50",
    "job_name": "datapulse demo"
  },
  "edge_device_sn": "MZ00MR0K"
}

200 OK, all-window summary

aggregation_level all collapses the selected time window into one row per camera/job.

{
  "rows_selected": 1,
  "items": [
    {
      "camera_id": 37,
      "camera_ip_address": "192.168.1.50",
      "job_name": "datapulse demo",
      "bucket_utc": null,
      "aggregation_level": "all",
      "total_inspections": 198342,
      "total_passes": 187901,
      "total_fails": 10441,
      "pass_rate": 0.9474,
      "first_inspection_utc": "2026-05-26T20:00:00.412Z",
      "last_inspection_utc": "2026-06-02T19:58:33.119Z"
    }
  ],
  "filter": {
    "aggregation_level": "all",
    "period": "last_7_days",
    "camera_id": 37,
    "camera_ip_address": "192.168.1.50",
    "job_name": "datapulse demo"
  },
  "edge_device_sn": "MZ00MR0K"
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
rows_selectedINTNumber of rollup rows returned.
more_availableBOOLOptional. Present only when the response was truncated by the limit.
items[].camera_idINTCamera identifier for the rollup row.
items[].camera_ip_addressSTRINGCamera IP address resolved from the camera ID.
items[].job_nameSTRINGLowercase canonical job name used for aggregation consistency.
items[].bucket_utcSTRING | nullBucket key. Hour, day, or month shape depending on aggregation_level; null for all.
items[].aggregation_levelSTRINGhour, day, month, or all.
items[].total_inspectionsINTTotal inspections in the bucket/window.
items[].total_passesINTTotal passing inspections.
items[].total_failsINTTotal failing inspections.
items[].pass_rateFLOAT | nulltotal_passes / total_inspections, rounded to 4 decimals.
items[].first_inspection_utcSTRINGEarliest inspection timestamp represented by the row.
items[].last_inspection_utcSTRINGLatest inspection timestamp represented by the row.
filterOBJECTServer-resolved view of the filters used for the query.
edge_device_snSTRINGSerial number of the gateway.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. Body contains job performance rollup rows.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Invalid auth, malformed body, invalid period, invalid aggregation level, conflicting filters, or invalid time/camera/job filter.
429Rate limit exceeded. Honor Retry-After.
500Internal error while querying rollups.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • This endpoint is intended for dashboard and reporting summaries, not raw inspection drilldown. For raw inspection drilldown, use QueryInspectionData.
  • QueryInspectionData provides inspection-level details, tag values, file names, and image references.
  • job_name is returned in lowercase canonical form for aggregation consistency.

GetEdgeDeviceHealth

GET
Path

/dw/GetEdgeDeviceHealth

Returns current disk and memory health metrics for the edge device.

Returns real-time disk capacity and memory utilization metrics for the gateway. Use this endpoint to monitor storage headroom before it reaches the deletion threshold and to check available memory.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Guardrails

Single health snapshot per call. No filters accepted.

Example request

A minimal call using the required authentication header.

curl https://<gateway-ip>:8443/dw/GetEdgeDeviceHealth \
  -H "X-DP-Token: <api-key>"
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK

Real gateway response (gateway MZ00MR0K, 2026-06-23). Disk usage at 19.42 % with 65.58 % headroom before the 85 % deletion threshold.

{
  "edge_device_health": {
    "disk_total_bytes": 253672550400,
    "disk_used_bytes": 49266671616,
    "disk_free_bytes": 204405878784,
    "disk_used_percent": 19.42,
    "deletion_storage_threshold_percent": 85,
    "disk_headroom_percent": 65.58,
    "memory_total_bytes": 8410865664,
    "memory_available_bytes": 5479755776,
    "memory_used_percent": 34.85,
    "collected_utc": "2026-06-23T19:00:20.000Z"
  },
  "edge_device_sn": "MZ00MR0K"
}

400 Bad Request - invalid token

{
  "error": "unauthorized",
  "reason": "invalid_or_missing_token",
  "endpoint": "GetEdgeDeviceHealth",
  "detail": "Authorization failed: invalid or missing X-DP-Token header."
}

500 Internal Server Error

Returned when the gateway cannot collect health metrics. Contact the gateway operator.

{
  "error": "internal_error",
  "reason": "edge_device_health_failed",
  "endpoint": "GetEdgeDeviceHealth",
  "detail": "Internal error while collecting edge device health metrics on the gateway."
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
edge_device_health.disk_total_bytesINTTotal disk capacity in bytes.
edge_device_health.disk_used_bytesINTBytes currently used on disk.
edge_device_health.disk_free_bytesINTBytes available on disk.
edge_device_health.disk_used_percentFLOATDisk utilization percentage, rounded to 2 decimal places.
edge_device_health.deletion_storage_threshold_percentINTConfigured threshold at which the gateway auto-deletes old data (read-only echo).
edge_device_health.disk_headroom_percentFLOATHow much headroom remains before deletion triggers: threshold minus used, clamped at 0.
edge_device_health.memory_total_bytesINTTotal physical memory in bytes.
edge_device_health.memory_available_bytesINTAvailable physical memory in bytes.
edge_device_health.memory_used_percentFLOATMemory utilization percentage, rounded to 2 decimal places.
edge_device_health.collected_utcSTRINGUTC timestamp when the health snapshot was collected, RFC 3339 with optional milliseconds.
edge_device_snSTRINGSerial number of the gateway.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. Body contains the edge_device_health object with disk and memory metrics.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Missing or invalid X-DP-Token (reason: invalid_or_missing_token).
429Rate limit exceeded. Honor Retry-After.
500Sub-trigger or PowerShell script failure (reason: edge_device_health_failed). Retrying is unlikely to help - contact the gateway operator.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • deletion_storage_threshold_percent is sourced from the gateway storage-management configuration and is read-only.
  • disk_headroom_percent = deletion_storage_threshold_percent − disk_used_percent, clamped at 0.
  • Percent fields are rounded to 2 decimal places to avoid floating-point transport noise.
  • collected_utc uses RFC 3339 UTC format with optional milliseconds, e.g. 2026-06-11T14:30:00.000Z.
  • edge_device_sn is included in the JSON body (not only an X-Edge-Device-SN header) because this is a JSON-body endpoint.

QueryWindowStats

POST
Path

/dw/QueryWindowStats

Returns aggregate inspection counts and pass rate for a custom sub-hour time window.

Returns a single aggregate row (total inspections, passes, fails, pass rate, first/last inspection timestamps) for a mandatory time window bounded by start_utc and end_utc. Supports optional tag-value and result filters. Maximum window is 90 days. Use this endpoint for real-time dashboard widgets, shift summaries, and custom analytics windows not covered by QueryJobPerformance's fixed periods.

Auth X-DP-Token: <api-key>

Required on every request. Replace <api-key> with the token provisioned for your client or integration.

Guardrails

start_utc, end_utc, camera_id, and job_name are all required. Maximum window is 90 days (window_too_large 400 otherwise). job_name must not be empty or 'All'.

Example request

A minimal call using the required authentication header.

curl https://<gateway-ip>:8443/dw/QueryWindowStats \
  -H "X-DP-Token: <api-key>" \
  -H "Content-Type: application/json" \
  -d '{"start_utc":"2026-02-17T17:00:00Z","end_utc":"2026-02-17T19:00:00Z","camera_id":37,"job_name":"DataPulse Demo"}'

Request filters

Optional request-body fields that narrow or page inspection results.

FieldTypeDescription
start_utcINT | STRINGRequired. Inclusive lower bound of the time window. Accepts epoch ms, ISO 8601 with Z, YYYY-MM-DD HH:MM:SS, or bare YYYY-MM-DD.
end_utcINT | STRINGRequired. Inclusive upper bound. Same accepted formats as start_utc. Bare date uses 23:59:59.999.
camera_idINTRequired. Exact camera match. Must be a positive integer known to this gateway.
job_nameSTRINGRequired. Exact job name match (case-insensitive). Must not be empty or 'All'.
dp_inspection_resultSTRINGOptional. All, Pass, or Fail. Defaults to All.
tag_value_filterARRAY | STRINGOptional. AND-combined tag filters. Same spec as QueryInspectionData.
Filter examples

Common request bodies for filtering inspections. These examples can be sent as the POST JSON body.

Three-hour window - DataPulse Demo

Request that produced the real A1 response above. start/end_utc in RFC 3339 Z format.

{
  "start_utc": "2026-02-17T17:00:00.000Z",
  "end_utc": "2026-02-17T19:59:59.999Z",
  "camera_id": 37,
  "job_name": "DataPulse Demo"
}

With Port Found tag filter

Narrow the aggregate to inspections where Port Found = 1 (pass-only subset). Returns 504 inspections with 98.41 % pass rate.

{
  "start_utc": "2026-02-17T17:00:00.000Z",
  "end_utc": "2026-02-17T19:59:59.999Z",
  "camera_id": 37,
  "job_name": "DataPulse Demo",
  "tag_value_filter": [{"tag": "Port Found", "op": "=", "value": "1"}],
  "dp_inspection_result": "All"
}

Full-day window using bare date

Bare YYYY-MM-DD accepted: start rounds to 00:00:00, end to 23:59:59.999.

{
  "start_utc": "2026-02-17",
  "end_utc": "2026-02-17",
  "camera_id": 37,
  "job_name": "DataPulse Demo"
}
Response examples

Representative bodies returned by the gateway. Exact data may vary by site.

200 OK - window with data

Real gateway response (gateway MZ00MR0K). 548 inspections for DataPulse Demo camera 37, 2026-02-17. 90.51 % pass rate.

{
  "total_inspections": 548,
  "total_passes": 496,
  "total_fails": 52,
  "total_unknown": 0,
  "pass_rate": 0.9051,
  "first_inspection_utc": "2026-02-17T17:06:38.978Z",
  "last_inspection_utc": "2026-02-17T18:00:35.998Z",
  "filter": {
    "start_utc": "2026-02-17T17:00:00.000Z",
    "end_utc": "2026-02-17T19:59:59.999Z",
    "camera_id": 37,
    "job_name": "DataPulse Demo",
    "tag_value_filter": [],
    "dp_inspection_result": "All"
  },
  "edge_device_sn": "MZ00MR0K"
}

200 OK - empty window (no rows match)

No inspections matched the filters. pass_rate and timestamp fields are null. This is a valid 200, not a 404.

{
  "total_inspections": 0,
  "total_passes": 0,
  "total_fails": 0,
  "total_unknown": 0,
  "pass_rate": null,
  "first_inspection_utc": null,
  "last_inspection_utc": null,
  "filter": {
    "start_utc": "2099-01-01T00:00:00.000Z",
    "end_utc": "2099-01-02T23:59:59.999Z",
    "camera_id": 37,
    "job_name": "DataPulse Demo",
    "tag_value_filter": [],
    "dp_inspection_result": "All"
  },
  "edge_device_sn": "MZ00MR0K"
}

400 - missing time bounds

start_utc (or end_utc) was omitted.

{
  "error": "bad_request",
  "reason": "missing_time_bounds",
  "endpoint": "QueryWindowStats",
  "detail": "start_utc is required."
}

400 - window too large

{
  "error": "bad_request",
  "reason": "window_too_large",
  "endpoint": "QueryWindowStats",
  "detail": "Time window exceeds maximum of 90 days."
}

400 - unknown camera_id

{
  "error": "bad_request",
  "reason": "unknown_camera_id",
  "endpoint": "QueryWindowStats",
  "detail": "camera_id 999 does not match any camera on this gateway."
}

Output fields

Fields clients should read from a successful response.

FieldTypeDescription
total_inspectionsINTTotal inspections in the window matching the filters.
total_passesINTTotal passing inspections.
total_failsINTTotal failing inspections.
total_unknownINTInspections with an unknown result (not Pass or Fail).
pass_rateFLOAT | nulltotal_passes / total_inspections, 4-decimal precision. null when total_inspections is 0.
first_inspection_utcSTRING | nullEarliest inspection timestamp in the window (RFC 3339 UTC with ms). null when no rows match.
last_inspection_utcSTRING | nullLatest inspection timestamp in the window (RFC 3339 UTC with ms). null when no rows match.
filterOBJECTEcho of resolved filters: start_utc, end_utc, camera_id, job_name, tag_value_filter, dp_inspection_result.
edge_device_snSTRINGSerial number of the gateway.

Success status

Successful HTTP response for this endpoint.

CodeMeaning
200Success. Body contains aggregate counts; pass_rate / first_last_utc may be null for empty windows.

Error codes

Error responses use the standard JSON error shape with error, reason, endpoint, and detail.

CodeWhen it happens
400Validation failure. Reason tokens: missing_time_bounds (start_utc or end_utc absent), missing_camera_id, missing_job_name, window_too_large (> 90 days), unknown_camera_id, invalid_or_missing_token.
429Rate limit exceeded. Honor Retry-After.
500Internal server error.
Rate limit

This endpoint allows a short burst of 30 req in <1 sec and a steady rate of 60 req/min per API key. If the limit is exceeded, the gateway returns 429 with Retry-After.

Client behavior

Avoid aggressive parallel polling. Treat 429 as a normal back-pressure signal and wait for the Retry-After value before retrying.

Implementation notes

Endpoint-specific behavior that clients should account for.

  • All four required fields must be supplied; omitting any returns 400.
  • pass_rate, first_inspection_utc, and last_inspection_utc may be JSON null when no Data rows match the filter - this is a valid 200, not a 404.
  • Time formats accepted: epoch ms, YYYY-MM-DD HH:MM:SS[.sss], ISO 8601 with Z, or bare YYYY-MM-DD (end-of-day uses 23:59:59.999).
  • Timestamps in the response use RFC 3339 UTC with milliseconds, e.g. 2026-02-17T17:06:38.978Z.
  • tag_value_filter uses the same spec as QueryInspectionData: array or JSON-encoded string.