05-18-2022 03:59 AM
Hi all,
I want create wiki page via API, but i can't find guide anywhere.
Thanks for support.
05-18-2022 05:23 AM
Hi @uakhhh
do you mean Rest API? If yes, there is a PUT request /alfresco/s/slingshot/wiki/page/{siteId}/{pageTitle} - you can find it's definition in the org/alfresco/slingshot/wiki/page.put.*
If you are interested in the Java API, have a look at the WikiPageMovePost.java (basically there is a WikiService)
05-18-2022 07:08 AM
Hi @upforsin
Yes rest API.
Could you help me about "curl" example or any thing like that?
I tried but got error 500: Wrapped Exception (with status template): null. Thanks alot!
05-22-2022 12:24 PM
Sample request: PUT http://localhost:8080/alfresco/slingshot/wiki/page/swsdp/Sample_title
Sample json body: {"page":"wiki-page","pageTitle":"Sample title","pagecontent":"<p>Lorem <strong>ipsum</strong></p>","tags":["tag1"]}
With cURL that would be something like:
curl -XPUT -H 'Accept: application/json' -H 'Authorization: Basic XXX=' -d '{"page":"wiki-page","pageTitle":"Sample title","pagecontent":"<p>Lorem <strong>ipsum</strong></p>","tags":["tag1"]}' 'http://localhost:8080/alfresco/slingshot/wiki/page/swsdp/Sample_title'
To get more info about getting the auth Token have a look here https://docs.alfresco.com/content-services/7.0/develop/rest-api-guide/install/
Explore our Alfresco products with the links below. Use labels to filter content by product module.