History

List trail changes

GET /api/v1/trail-changes — List trail changes.

GET /api/v1/trail-changes

Retrieve recorded entity changes with optional exact mountain, name, zone, source and run filters. Use this collection for a paginated activity log.

Authentication

An API key is required for external integrations. Send X-API-Key: YOUR_API_KEY or Authorization: Bearer YOUR_API_KEY. Authentication explains public origin and secret IP restrictions.

Parameters

Query parameters

ParameterTypeRequiredDefaultDescription
mountainstringNo—Mountain UUID, exact; slug is not resolved.
trail_namestringNo—Exact recorded entity name.
zonestringNo—Exact zone.
run_idstringNo—Exact run ID.
sourcestringNo—Exact source label.
limitintegerNo100Maximum records; send a positive integer.
offsetintegerNo0Records to skip; send a nonnegative integer.
sortBystringNocreated_atSort column. Unsupported columns fall back to the default. Accepted: created_at, trail_name, zone
sortDirectionstringNodescSort direction. Accepted: asc, desc

Recorded changes are not a full time series of resort states. Unchanged observations need not create rows. No retention duration is guaranteed. Preserve the returned fields payload. Query validation bounds are not enforced.

Example request

curl -H "X-API-Key: $ICECOAST_API_KEY" 'https://api.icecoast.us/api/v1/trail-changes?limit=2'

JavaScript above is a server-side Node.js example. Browser clients must use an origin-restricted public key; never bundle a secret key.

Response

Success is HTTP 200 with success: true, data and meta.version: "v1". See pagination for meta fields and next/previous links.

The following is a synthetic response excerpt illustrating the verified structure. Names, IDs, counts and dates are examples, not live resort data. Optional fields are omitted.

{
  "success": true,
  "data": [
    {
      "id": 123,
      "mountain": "00000000-0000-4000-8000-000000000001",
      "trail_name": "Example Trail",
      "zone": "Main",
      "fields": {
        "open": {
          "from": false,
          "to": true
        }
      },
      "run_id": null,
      "source": "example",
      "created_at": "2026-12-04T12:00:00.000Z"
    }
  ],
  "meta": {
    "version": "v1",
    "total": 1,
    "limit": 100,
    "offset": 0,
    "count": 1,
    "hasMore": false,
    "links": {
      "next": null,
      "prev": null
    }
  }
}

Resource fields

FieldTypeMeaning
idinteger / stringSee the data model and returned resource.
mountainstringMountain UUID.
trail_namestringTrail name, on trail changes.
lift_namestringLift name, on lift changes.
zonestring / nullZone.
fieldsobjectChanged-field payload; preserve its returned structure.
run_idstring / nullAssociated ingestion run if recorded.
sourcestring / nullRecorded source label.
created_atstringChange-record timestamp.

Record fields may be missing or null. Treat identifiers as opaque and distinguish unavailable values from confirmed false/zero. See data semantics.

Errors

HTTP statusMeaning
400Invalid request parameters where validated.
401Missing, invalid, expired or revoked API key.
403Origin/IP restriction or endpoint key-type restriction denied the request.
429Monthly API allowance exhausted when a key is used.
500The resource could not be read.
503API-key/quota verification unavailable.

JSON errors may use error or message; the global handler maps validation/runtime errors to success: false, error (name) and message (details). See error handling.