diff --git a/adapters/secondary/gateways/web/templates/componentNavbar.html b/adapters/secondary/gateways/web/templates/componentNavbar.html index 41bcde2..5437d97 100644 --- a/adapters/secondary/gateways/web/templates/componentNavbar.html +++ b/adapters/secondary/gateways/web/templates/componentNavbar.html @@ -18,6 +18,9 @@
How to use headless API
+This documentation explains how to integrate our headless CMS API to retrieve post data via the /post
+ route.
The {{ .Host }}/v1/post route returns a list of posts in JSON format. Each post has the
+ following
+ structure:
+[
+ {
+ "id": 12,
+ "title": "This is a post!",
+ "body": "<p>?</p>\r\n<p><img src=\"../../static/uploadedImages/649691a8-4f2e-48ca-9abe-27a60621d2e4.png\"
+ alt=\"\" width=\"391\" height=\"465\"></p>",
+ "created_at": "2024-06-13T15:30:55.3563238+02:00",
+ "updated_at": "2024-06-13T15:31:17.5508931+02:00"
+ }
+]
+
+ The {{ .Host }}/v1/post/{id} route returns a single post in JSON format. The post has the
+ following
+ structure:
+{
+ "id": 12,
+ "title": "ravioli sans le ra et le i",
+ "body": "<\p>?<\/p>\r\n<\p><\img src=\"../../static/uploadedImages/649691a8-4f2e-48ca-9abe-27a60621d2e4.png\" alt=\"\"
+ width=\"391\" height=\"465\"><\/p>",
+ "images": [
+ {
+ "id": 17,
+ "path": "/static/uploadedImages/649691a8-4f2e-48ca-9abe-27a60621d2e4.png",
+ "post_id": 0,
+ "created_at": "2024-06-13T15:31:09.728359+02:00",
+ "updated_at": "2024-06-13T15:31:09.728359+02:00"
+ }
+ ],
+ "created_at": "2024-06-13T15:30:55.3563238+02:00",
+ "updated_at": "2024-06-13T15:31:17.5508931+02:00"
+}
+
+