You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update docs with openapi support and preview endpoints
* Refactor API documentation using tables for endpoints
* Adjust table formatting
* Update README with detailed features and headless CMS info
* Update README.md
Co-authored-by: Fabian Braun <fsbraun@gmx.de>
---------
Co-authored-by: Fabian Braun <fsbraun@gmx.de>
|`/api/plugins/`| Fetch types forall installed plugins. Used for automatic type checks with frontend frameworks. |
277
+
|`/api/{language}/pages-root/`| Fetch the root page for a given language. |
278
+
|`/api/{language}/pages-tree/`| Fetch the complete page tree of all published documents for a given language. Suitable for smaller projects for automatic navigation generation. For large page sets, use the `pages-list` endpoint instead. |
279
+
|`/api/{language}/pages-list/`| Fetch a paginated list. Supports `limit`and`offset` parameters for frontend structure building. |
280
+
|`/api/{language}/pages/{path}/`| Fetch page details by path for a given language. Path and language information is available via `pages-list`and`pages-tree` endpoints. |
281
+
|`/api/{language}/placeholders/`<br/>`{content_type_id}/{object_id}/{slot}/`| Fetch published page content objects for a given language. Parameters available from page detail. |
282
+
283
+
### Private API (Preview)
284
+
285
+
For all page related endpoints draft content can be fetched, if the user has the permission to view
286
+
preview content.
287
+
To determine permissions `user_can_view_page()`from djangocms is used, usually editors with
|`/api/preview/{language}/pages-root`| Fetch the latest draft content for the root page. |
293
+
|`/api/preview/{language}/pages-tree`| Fetch the page tree including unpublished pages. |
294
+
|`/api/preview/{language}/pages-list`| Fetch a paginated list including unpublished pages. |
295
+
|`/api/preview/{language}/pages/{path}`| Fetch the latest draft content from a published or unpublished page, including latest unpublished content objects. |
296
+
|`/api/preview/{language}/placeholders/`<br/>`{content_type_id}/{object_id}/{slot}`| Fetch the latest draft content objects for the given language. |
297
+
||
298
+
299
+
### Sample API-Response: api/{en}/pages/{sub}/
300
+
301
+
```json
302
+
{
303
+
"title": "sub",
304
+
"page_title": "sub",
305
+
"menu_title": "sub",
306
+
"meta_description": "",
307
+
"redirect": null,
308
+
"in_navigation": true,
309
+
"soft_root": false,
310
+
"template": "INHERIT",
311
+
"xframe_options": 0,
312
+
"limit_visibility_in_menu": null,
313
+
"language": "en",
314
+
"path": "sub",
315
+
"absolute_url": "/sub/",
316
+
"is_home": false,
317
+
"languages": [
318
+
"en"
319
+
],
320
+
"is_preview": false,
321
+
"creation_date": "2025-02-26T21:22:16.844637Z",
322
+
"changed_date": "2025-02-26T21:22:16.856326Z",
323
+
//GETCONTENT using `/api/{language}/placeholders/{content_type_id}/{object_id}/{slot}/`
0 commit comments