Once user modified/updated data in content using , we click on save so after saving the data
http://localhost:8080/cms/?1
But when i access http://localhost:8080/site/api/documents
I am not able to see the updated JSON until i did published
Is their any why we can do Achieve this?
Steps i tried so far in my local:
- Created Beans using bean writer in essentials.
- Created Rest Full service for the Bean
- When i use the URl
- from here i can modify any thing to achieve?
below http://localhost:8080/site/api-manual/myexample/
I am getting console logs in my rest controller.
which is created at
myproject/elcapitan/site/components/src/main/java/com/example/rest/HelloMenuResource.java
This seems to be just right, publishing makes content available for live site or REST output.
What exactly are you trying to achieve?
Regards, Jeroen
You could add a new mount which you call api-preview
for example, this mount needs the property hst:type=preview
and then you can access all unpublished data over this endpoint. For example when your live content is visible over http://localhost:8080/site/api/documents
you can now access your preview content over http://localhost:8080/site/api-preview/documents
Hope this helps!
Best regards,
Jesper
Thanks Jesper it worked Steps What i did.
-
I verified the http://localhost:8080/site/api/documents and able to see the published content only.
-
I did went to hst:myprpject=>hst:hosts => dev-localhost => hst:root => copied the node for current api then crated new node with name api-preview and added property hst:type as preview
-
then I verified the http://localhost:8080/site/api-preview/documents
i am able to see the unpublished data.
1 Like
it works when i access able to see all documents.
http://localhost:8080/site/api-preview/documents
once i click data it is not working it giving empty {}
When i click on http://localhost:8080/site/api-preview/documents/83fd1f43-0567-4cc3-b01b-6adb3cdc1c37
it is empty is their any way to handle child’s
{
-
name: “secondary-nav”,
-
id: “83fd1f43-0567-4cc3-b01b-6adb3cdc1c37”,
-
link: {
-
type: “myproject:SampleMenu”,
-
locale: “en”
}