fastmon Docs
Applications

Discover Application Pagetype Rules

Report an issue

Propose pagetype_rules from a few pages the customer labelled.

The customer says "this URL is a product page". scout reads it, and the class that appears there and on nothing else is the proposal. The home page is read alongside as the contrast, because a single page cannot say which of its thirty classes means "product".

Proposals only. The response carries a rules list shaped exactly like the field, and somebody PATCHes it after looking.

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

app_id*App Id
Formatuuid

Request Body

application/json
  1. body

Ask for rule proposals from a handful of labelled pages.

Every URL has to sit on a domain of this application. The endpoint makes the server fetch what it is given, so the customer's own domains are the whole target set; only the path is theirs to choose.

pages*array<>
Items1 <= items <= 4

Response Body

Successful Response

application/json
  1. response

Proposals only. Writing them is a separate PATCH the customer confirms.

rules?array<>

The confident subset, ready to PATCH as pagetype_rules: one page type, exactly one class. A type with several candidates or none is left out and appears under candidates instead.

candidates?array<>

Every labelled page type and what was found for it.

pages?array<>

Every page read, the baseline included.

POST
/applications/{app_id}/pagetype/discover
curl -X POST 'https://api.fastmon.eu/applications/497f6eca-6276-4993-bfeb-53cbbbba6f08/pagetype/discover' \  -H 'Content-Type: application/json' \  -d '{  "pages": [    {      "url": "string",      "page_type": "string"    }  ]}'
{  "rules": [    {      "body_class": "string",      "page_type": "string"    }  ],  "candidates": [    {      "page_type": "string",      "body_classes": [        "string"      ]    }  ],  "pages": [    {      "url": "string",      "page_type": "",      "read": true,      "status_code": 0,      "body_classes": [        "string"      ]    }  ]}