Frontend Map API
All endpoints follow Strapi’s standard response conventions:
- Success → HTTP
2xxwith{ "data": ..., "meta": {} }. - Error → the matching HTTP status with
{ "data": null, "error": { "status", "name", "message", "details" } }.
The HTTP status code is authoritative — there is no ok flag. Status codes used:
| Status | Meaning |
|---|---|
200 | Success |
400 | Missing or invalid query parameter (ValidationError) |
404 | Nothing matched the request (NotFoundError) |
501 | The server is missing configuration required to fulfil the request (NotImplementedError) |
500 | Unexpected server error |
Get content type from path
GET /api/get-content-type?pathname=[path]&site=[site]&locale=[locale]&compact=[bool]Example:
GET /api/get-content-type?pathname=/hotels/andronis-boutique-hotel/restaurants/lauda-restaurant&site=andronis&locale=en&compact=falseExample response (200):
{
"data": {
"site": "andronis",
"pathname": "/hotels/andronis-boutique-hotel/restaurants/lauda-restaurant",
"locale": "en",
"matched": {
"collectionType": "plugin::andronis.andronis-restaurant",
"rule": "{locale}/{hotel}/restaurants/{slug}",
"params": {
"locale": "en",
"hotel": "andronis-boutique-hotel",
"slug": "lauda-restaurant"
}
}
},
"meta": {}
}Example response with compact=true (200):
{
"data": {
"contentType": "plugin::andronis.andronis-restaurant"
},
"meta": {}
}Errors:
400—siteis missing or unknown.404— no rule matched the pathname. Passdebug=1to include the consideredcandidatesundererror.details.
{
"data": null,
"error": {
"status": 404,
"name": "NotFoundError",
"message": "No content type matches the given pathname",
"details": {
"pathname": "/no/such/path",
"normalizedPath": "/no/such/path"
}
}
}Get public URL for a document
Returns the absolute public frontend URL for a single document (powers the admin “Open live page” button).
GET /api/frontend-url?uid=[content-type-uid]&documentId=[id]&locale=[locale]&status=[draft|published]Example response (200):
{
"data": {
"url": "https://www.andronis.com/hotels/andronis-boutique-hotel/restaurants/lauda-restaurant",
"path": "/hotels/andronis-boutique-hotel/restaurants/lauda-restaurant"
},
"meta": {}
}Errors:
400—uidordocumentIdis missing.404— the content type has no frontend URL rule, or the document was not found.501—FRONT_END_URL_<SITE>is not configured on the server. The relativepathis still returned undererror.details.
Build sitemap
GET /api/build-sitemap?site=[site]&contentType=[content-type]&xml=[bool]&validate=[bool]Example:
GET /api/build-sitemap?site=andronis&contentType=plugin::andronis.andronis-restaurantExample response (200):
{
"data": {
"count": 9,
"urls": [
"https://andronis.com/hotels/andronis-arcadia/restaurants/grande-pool",
"https://andronis.com/hotels/andronis-boutique-hotel/restaurants/lauda-restaurant"
]
},
"meta": {}
}With validate=true, each generated URL is requested and the response reports
status counters under data (byClass, byStatus, and per-URL results). Each
result is { url, status, ok }, plus location on redirects. When the request
never gets a response, status is null and a reason field explains why
(e.g. "timeout after 10000ms" or "fetch failed").
Example response with xml=true (Content-Type: application/xml):
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://andronis.com/hotels/andronis-arcadia/restaurants/grande-pool</loc>
</url>
<url>
<loc>https://andronis.com/hotels/andronis-boutique-hotel/restaurants/lauda-restaurant</loc>
</url>
</urlset>Errors:
400—siteorcontentTypeis missing, thesiteis unknown, or no rule exists for thecontentTypein that site.