Skip to Content

Sitemap

Generate the list of public frontend URLs for one content type of a site, from the frontend map rules. Responses follow the standard envelope: success → { "data": ..., "meta": {} }.

GET /api/build-sitemap?site=[site]&contentType=[content-type]&xml=[bool]&validate=[bool]
ParamRequiredDescription
siteyesSite key (e.g. andronis).
contentTypeyesContent-type UID (e.g. plugin::andronis.andronis-restaurant).
xmlnotrue → return an XML sitemap instead of JSON.
validatenotrue → fetch every URL and report its HTTP status (always JSON).

JSON (default)

GET /api/build-sitemap?site=andronis&contentType=plugin::andronis.andronis-restaurant
{ "data": { "count": 9, "urls": [ "https://www.andronis.com/hotels/andronis-arcadia/restaurants/grande-pool", "https://www.andronis.com/hotels/andronis-boutique-hotel/restaurants/lauda-restaurant" ] }, "meta": {} }

XML (xml=true)

Returns Content-Type: application/xml:

<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://www.andronis.com/hotels/andronis-arcadia/restaurants/grande-pool</loc> </url> </urlset>

Validate (validate=true)

Requests each generated URL (10 at a time, 10s timeout each, redirects not followed) and reports the result. ok is strictly 2xx.

{ "data": { "validated": true, "site": "andronis", "contentType": "plugin::andronis.andronis-restaurant", "count": 9, "byClass": { "2xx": 8, "3xx": 1, "4xx": 0, "5xx": 0, "error": 0 }, "byStatus": { "200": 8, "301": 1 }, "results": [ { "url": "https://www.andronis.com/...", "status": 200, "ok": true }, { "url": "https://www.andronis.com/...", "status": 301, "ok": false, "location": "https://..." } ] }, "meta": {} }

A result with "status": null means no response arrived; a reason field says why (e.g. "timeout after 10000ms" or "fetch failed").

Errors

400 when site or contentType is missing, the site is unknown, or no rule exists for the contentType in that site:

{ "data": null, "error": { "status": 400, "name": "ValidationError", "message": "No rule found for contentType \"plugin::andronis.bogus\" in site \"andronis\"" } }
Last updated on