# Fetches every item on the board with all tracked column values. # Paginated — cursor returned in response, repeated until cursor is null. query { boards(ids: ["18400289314"]) { items_page(limit: 100) { cursor # pass back to next_items_page to get next page items { id name group { id title } # THIS is stage ground-truth, not status text column_values(ids: [ "status", # raw status text + changed_at (for days_in_status fallback) "color_mm41w0xf", # sales_org "text_mm0mg016", # sales_person "color_mm0mdhbq", # payment type "color_mm0m6jm3", # project_scope "date4", # submission_date (homeowner application date) "color_mm0mhb2j", # heat_loan status "color_mm4df55h", # lightreach status "color_mm0m58m8", # permit_status "color_mm413tef", # hea_completed "long_text_mm0m4ree", # project_notes "numeric_mm452jf6", # system_size "color_mm0m5ax" # manufacturer # ... + 9 more columns ]) { id text value } } } } } # Subsequent pages use next_items_page with the cursor: query { next_items_page(cursor: "<cursor from previous response>", limit: 100) { cursor items { id name group { id title } column_values { id text value } } } }
fetching…
# Called once per batch of 50 item IDs after fetchAllItems() completes. # For 61 records → 2 batches → 2 API calls for this query. # Paginated per batch (page++) until fewer than 100 events returned. query { boards(ids: ["18400289314"]) { activity_logs( limit: 100, page: 1, item_ids: [id1, id2, /* …up to 50 ids */] ) { id event # we keep only: "create_pulse" | "move_pulse_from_group" created_at # 100-microsecond units → ÷10,000 = Unix ms data # JSON string — structure differs by event type: } } } # data for "create_pulse": # { "pulse_id": 12345, "group_name": "Submitted" } # → gives us the initial group the item was created in # data for "move_pulse_from_group": # { "pulse_id": 12345, # "source_group": { "id": "...", "title": "Site Survey" }, # "dest_group": { "id": "...", "title": "Installation" } } # → gives us source + destination + exact timestamp of each move # Timestamp conversion (verified against known event): # 17824158713494020 → Number(BigInt(t) / 10000n) → 1750884671349 ms # → new Date(1750884671349) → 2026-06-25T19:31:11Z ✓
fetching…
// computeGroupHistory() merges both and produces: { "stage_history": [ { "group": "Submitted", "entered_at": "2026-06-06T…", "days": 3 }, { "group": "Site Survey", "entered_at": "2026-06-09T…", "days": 8 }, { "group": "Installation","entered_at": "2026-06-17T…", "days": 9 } // ← current ], "entered_current_group_at": "2026-06-17T14:05:49Z", "days_in_stage": 9 // today − entered_current_group_at // null if no log data → falls back to days_in_status }