As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi all,
I want create wiki page via API, but i can't find guide anywhere.
Thanks for support.
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)
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!
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/