fastmon Docs
Applications

Discover Application Pagetype Rules

Fehler melden

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.

AuthentifizierungBearer <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.

In: header

Pfad-Parameter

app_id*App Id
Formatuuid

Request-Body

application/json

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.

Response-Body

application/json

application/json

application/json

application/json

application/json

application/json

POST
/applications/{app_id}/pagetype/discover
curl -X POST "https://example.com/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": 0,      "body_classes": [        "string"      ]    }  ]}