Skip to main content

Get device telemetry data with cursor-based pagination

GET 

/api/v1/devices/{deviceId}/inputs/data-objects

Retrieve telemetry data objects for a device using cursor-based pagination for better performance.

Why Cursor-based Pagination?

  • Much faster than offset-based pagination, especially for large datasets
  • Constant performance regardless of page depth (page 1 and page 1000 have same speed)
  • No expensive OFFSET operations that skip thousands of records
  • No totalCount calculation - avoids heavy COUNT queries

How to Use:

  1. First request: Omit the cursor parameter
  2. Subsequent requests: Use nextCursor from previous response as cursor parameter
  3. Continue until hasMore is false

Parameters

  • deviceId (string, required): Unique identifier of the device. Example: 74fe488d5d35
  • start (DateTime, required): Start timestamp of the query range. Example: 2025-09-01T00:00:00Z
  • end (DateTime, required): End timestamp of the query range. Example: 2025-09-02T00:00:00Z
  • cursor (long, optional): Cursor timestamp from previous page (Unix milliseconds). Omit for first page.
  • limit (int, optional): Maximum results per page (default: 17, max: 1000).

Response Fields:

  • items: Array of telemetry records
  • nextCursor: Timestamp to use for next page (null if no more data)
  • hasMore: Whether there are more pages available

Example Usage:

# First page
GET /devices/74fe488d5d35/inputs/data-objects?start=2025-01-01T00:00:00Z&end=2025-01-02T00:00:00Z&limit=100

# Second page (use nextCursor from first response)
GET /devices/74fe488d5d35/inputs/data-objects?start=2025-01-01T00:00:00Z&end=2025-01-02T00:00:00Z&cursor=1704153600000&limit=100

Performance Comparison:

  • Page 1: OFFSET ~100ms vs Cursor ~100ms (same)
  • Page 100: OFFSET ~500ms vs Cursor ~100ms (5x faster)
  • Page 1000: OFFSET ~2000ms vs Cursor ~100ms (20x faster)

Responses

  • 200 OK: returns cursor-based paginated telemetry records.

Security

  • This API requires authentication.

Request

Responses

OK