get the contents of a wiki page

Takuya Iwamoto August 13, 2018

Hi,

 

I want to know how to acquire the contents of a wiki page.

For example, if there is a wiki page like the following, what kind of API should be created?


https://my-domain.atlassian.net/wiki/spaces/~1234567890/pages/1234567890/page_title

 

And, I want to know the API details.

 

1 answer

0 votes
Maarten Cautreels
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2018

Hi @Takuya Iwamoto,

It's actually not that difficult. You can simply use the id behind /pages in the following request: 

https://my-domain.atlassian.net//wiki/rest/api/content/1234567890

This will return all page metadata. If you'd like the content of the page (the actually text and layout), you should add the expand attribute to the url like this:

https://my-domain.atlassian.net//wiki/rest/api/content/1234567890?expand=body.view

The body expand value has several options:

  • view
  • export_view
  • styled_view
  • storage
  • editor
  • anonymous_export_view

Please do not forget you need authentication. More info about authenticating against Cloud REST APIs can be found here.

Hope this helps.

Best,

Maarten

Takuya Iwamoto October 11, 2018

@Maarten Cautreels

Hello,

 

Sorry, the situation changed and renewing Confluence, I want to know details of the API in the domain of ".../pages/viewpage.action?pageId=...", not ".../wiki/rest/api/content/...".

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events