Saranac BETA

REST API for as-built data from the RPD 35 robotic pile driving solution.

Endpoint

GET /as-built

Date parameters are Unix epoch timestamps (seconds since 1970-01-01 UTC). The response is a JSON array of pile installation records.

Authentication

Include your API key in the request header:

HeaderDescription
X-API-Key Your secret API key required

Query Parameters

ParameterTypeDescription
start_epoch number required Start time as Unix epoch (seconds since 1970-01-01 UTC)
end_epoch number optional End time as Unix epoch (seconds since 1970-01-01 UTC). Defaults to now.
projectstring optionalOne authorized project name, such as cantaloupe. Omit to query all your projects. Other names return 404.
distance_units string optional Output unit for all distance fields. Default: ft

Available Distance Units

The distance_units parameter accepts the following labels:

LabelUnit
mMeters
ftFeet (international) — default
sftSurvey feet (US)
inchInches
Passing a label not in this list will result in a 422 error with a descriptive message.

Example Requests

# Fetch piles installed on a single day (2026-01-15 00:00 PST)
curl -H "X-API-Key: YOUR_KEY" \
  "https://saranac.builtrobotics.com/as-built?start_epoch=1768464000"

# Fetch piles installed in a date range (2026-01-01 to 2026-01-31 PST)
curl -H "X-API-Key: YOUR_KEY" \
  "https://saranac.builtrobotics.com/as-built?start_epoch=1767254400&end_epoch=1769846400"

# Receive all distance fields in survey feet
curl -H "X-API-Key: YOUR_KEY" \
  "https://saranac.builtrobotics.com/as-built?start_epoch=1768464000&distance_units=sft"

Response Fields

Each object in the JSON array contains:

FieldDefault UnitDescription
project_idProject identifier
machine_idMachine (robot) identifier
pile_idUnique pile identifier
tracker_idTracker (rack) identifier from the install instruction
pile_colorPile coloration
pile_cross_sectionCross-section designation
pile_lengthftTotal pile length
timestamp_epochsInstallation timestamp (Unix epoch seconds)
recorded_eastingftEasting coordinate of pile head
recorded_northingftNorthing coordinate of pile head
recorded_elevationftElevation of pile head
proposed_gradeftProposed ground elevation
embedmentftEmbedded length (pile_length minus reveal)
revealftLength of pile above ground
drive_timesTime spent driving the pile
cycle_timeFull cycle time (minutes:seconds)
pile_pitchdegPitch angle of installed pile
pile_rolldegRoll angle of installed pile
twistdegTwist angle of installed pile
measured_gradeftMeasured ground elevation
grade_diffftMeasured minus proposed grade

Example Response

[
  {
    "project_id": "12345678910",
    "machine_id": "artemis",
    "pile_id": "1234",
    "tracker_id": "123",
    "pile_color": "Red",
    "pile_cross_section": "W6x9",
    "pile_length": 12.5,
    "timestamp_epoch": 1736966520.0,
    "recorded_easting": 2145678.123,
    "recorded_northing": 456789.456,
    "recorded_elevation": 1234.567,
    "proposed_grade": 1232.1,
    "embedment": 10.2,
    "reveal": 2.3,
    "drive_time": 45.6,
    "cycle_time": "3:22",
    "pile_pitch": 0.12,
    "pile_roll": -0.05,
    "twist": 1.3,
    "measured_grade": 1232.3,
    "grade_diff": 0.2
  }
]

Error Responses

StatusReason
401Missing or invalid X-API-Key
404Unknown project, or one your key is not authorized for
422Invalid or missing query parameters, or an unrecognized distance_units label
429Too many requests. The limit is 20 requests per minute, with a burst of 10.
503The requested time range holds too much data to return in time. The JSON body has "error": "query_timeout". Request at most 30 days per call using start_epoch/end_epoch and page through the range.

Changelog

2026-10-15
  • Requests that cannot finish in time now return 503 with a JSON query_timeout error and a Retry-After header, instead of a 500 or 504.
2026-07-14
  • Added tracker_id response field (the tracker a pile belongs to), positioned immediately after pile_id.
2026-05-13
  • Changed default unit for all distance fields from sft (US survey feet) to ft (international feet).
  • Added distance_units query parameter to override the output unit for all distance fields. Valid labels: m, ft, sft, inch.