hosting
GET /v1/sites/{siteId}/vitals/history
Get a site's speed history and change timeline.
ማረጋገጫ
የኤፒአይ ቁልፍ (API key) እንደ ቢረር ቶከን (bearer token) ይላኩ። ይህ የመጨረሻ ነጥብ (endpoint) በመግለጫው ውስጥ የተወሰነ ፈቃድ አልገለጸም፣ ስለዚህ ከማሰብ ይልቅ ለቁልፍዎ የሚያስፈልገውን አነስተኛ ፈቃድ ይስጡት እና ምላሹን ያረጋግጡ።
ይህ ኤንድፖይ መክፈቻ (endpoint) የድርጅት መታወቂያ (organisation id) አይወስድም። የእርስዎ ቁልፍ (key) እሱ የሚመለከተውን ድርጅት አስቀድሞ ይለያል፣ እና ምላሹም ለዚሁ የተወሰነ ነው።
ሞክሩት
በቅንፍ ውስጥ ያለውን ማንኛውንም ነገር በራስዎ እሴቶች ይተኩ፣ እና ቁልፍ ቦታ ያዢውን ከዳሽቦርድዎ በመጣ ቁልፍ ይተኩ።
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/vitals/history \
-H "Authorization: Bearer zdk_live_…"ገብተዋል? የመቆጣጠሪያ ማዕከልዎ ውስጥ ያለው የኤፒአይ ኮንሶል ትክክለኛውን የድርጅት መታወቂያዎን እና የራስዎን ቁልፍ ይሞላል፣ እና ትክክለኛውን ምላሽ ማየት እንዲችሉ ጥያቄውን በቀጥታ ከሚሰራው ኤፒአይ ጋር ያካሂደዋል። ይህን ኤንድፖይንት በAPI ኮንሶል ውስጥ ይክፈቱ
ዝርዝሮች
How the site's speed has moved over time, **and what changed on the site**, on one axis — so a customer can see that activating a plugin cost them 0.4 s rather than having to remember it. **This is the consumer that was missing.** Vitals rows have been kept since #626 with a comment saying they exist "so the Performance tab can show a trend"; nothing ever read them, there was no time-series endpoint, and there was no charting library in the repo. The trend was being stored correctly, for weeks, for nobody. **Two producers, one axis.** `points` are Lighthouse measurements taken off the request path by a scheduled sweep. `events` are what the site reported about itself over a signed webhook (plugin activated, core updated, theme switched, PHP version changed), merged with its successful deploys. Events carry the time they happened **on the site**, so a webhook delivered late still lands beside the score it explains. **`score_delta` is computed here.** Two clients subtracting two nullable columns is two chances to render `-87` for "we did not measure the earlier one". ⚠️ **Cadence.** The sweep measures a fixed number of sites per hour, so on a large estate a site's points can be days apart. A site that reports a change is moved to the front of the next sweep, which is why the timeline — not the sweep — is the primary signal for attributing a regression (docs/85 §4.2). RLS-scoped to a site the caller can view (`sites.view`); an out-of-scope or unknown id is a `404` alike, exactly like `getSite`.
መለኪያዎች
| ስም | ዓይነት | የሚያስፈልግ | ምንነቱ |
|---|---|---|---|
siteId (path) | Uuid | አዎ | Site ID (UUIDv7). |
days (query) | integer | አይ | How far back to look. Clamped rather than rejected — this is a cheap read of the caller's own data, so a `422` on `days=0` would be a worse experience than a sensible window, an… |
ምላሽ
| ስም | ዓይነት | የሚያስፈልግ | ምንነቱ |
|---|---|---|---|
points | SiteVitalsHistoryPoint[] | አዎ | Oldest → newest, so a chart renders it without reversing. Capped; when a site has more measurements than the cap, the **most recent** are returned — a chart that stopped before… |
events | SiteEvent[] | አዎ | Oldest → newest, on the same axis as `points`. |
stack_type | string | አዎ | The site's configured stack — `static`, `php`, `wordpress`, `woocommerce`, `node`, `one_click`. Decides which advice and which events apply: a static site must never be given Wo… |
stack_packs | string[] | አዎ | What the newest lab run detected. Resolves `one_click`, which is a container for "whatever the customer installed" and therefore knows nothing about itself. |
opportunities | SiteVitalsOpportunity[] | አዎ | The newest lab run's opportunities. On a customer surface these are the same rows `getSiteVitals` returns; on the staff surface they additionally include `owner: platform` audit… |
recommendation | SpeedUpRecommendation | አዎ | Which optimisation tier to lead with for this site, and the evidence for it (docs/85 §7). Before this, the speed-up offer fired on a traffic-light band alone while the platform… |
ይህ ማብቂያ ሊመልሳቸው የሚችሉ ስህተቶች
401 · 403 · 404 · 429