fastmon Docs
Analytics

Summarize a metric page in a few sentences

Report an issue

The sentences of a metric page's summary box, and the numbers they rest on.

The text is plain and already in the requested language. A part with a section names the page section that shows its evidence. facts carries the numbers, so the tiles above the box read the same values. Every statement is served from the analytics result cache, the rendering is not cached.

Authorization

bearerAuth
headerAuthorizationBearer <token>

API token generated from the fastmon dashboard (Account → API Token) or at organization level (fmo_…, one that outlives its creator). Send as Authorization: Bearer fm_... or paste the full token (including its prefix) into the Authorize dialog.

Path Parameters

org_id*Org Id
Formatuuid

Request Body

application/json
  1. body

The metric page, its scope and the language to write in.

metric*"lcp"

The metric page to summarize

Value in"lcp"
time_range*

The window, as /analytics/query takes it

filters?

Optional filters, as /analytics/query takes them

aggregation?AggregationType

The percentile the page shows: p50, p75, p90 or p95

Default"p75"
Value in"count""avg""sum""min""max""p50""p75""p90""p95""p99""good_share""needs_improvement_share""poor_share"
language?Language

The language of the sentences. A tag such as de-AT counts by its first two letters, and a language the summary does not speak falls back to en

Lengthlength <= 16
Default"en"

Response Body

Successful Response

application/json
  1. response

The sentences of a metric page's summary box and the facts behind them.

meta*

Facts about the result

request*

The request as the server resolved it

language*Language

The language the sentences are in

Value in"en""de"
sentences*array<>

In reading order, empty without data

facts*

The numbers the sentences rest on

POST
/organizations/{org_id}/analytics/metric-summary
curl -X POST 'https://api.fastmon.eu/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/analytics/metric-summary' \  -H 'Content-Type: application/json' \  -d '{  "metric": "lcp",  "time_range": {    "from": "2019-08-24T14:15:22Z",    "to": "2019-08-24T14:15:22Z"  }}'
{  "meta": {    "execution_time_ms": 0,    "total": 0,    "limit": 0,    "offset": 0,    "has_more": true,    "next_cursor": "string",    "sampling": {      "sampling_rate": 0,      "is_sampled": true,      "estimated_metrics": [        "string"      ]    },    "is_identity_mixed": true  },  "request": {    "time_range": {      "from": "2019-08-24T14:15:22Z",      "to": "2019-08-24T14:15:22Z"    },    "comparison_time_range": {      "from": "2019-08-24T14:15:22Z",      "to": "2019-08-24T14:15:22Z"    },    "granularity": "minute",    "identity": "stitch",    "window_seconds": 0,    "filters": {}  },  "language": "en",  "sentences": [    {      "sentence_type": "rating",      "severity": "good",      "parts": [        {          "text": "string",          "section": "phases"        }      ]    }  ],  "facts": {    "value": 0,    "previous_period": {      "value": 0    },    "direction": "worse",    "rating": "good",    "good_share": 0,    "poor_share": 0,    "lead_phase": "string",    "coverage": 0  }}