Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

How can I API to get Wiki pages MD or HTML content?

I see the repository endpoint for getting files from a repository, and for getting files here.
I know I can specify a media encoding type to get rendered HTML or raw Markdown, but I see no way to get the contents of Wiki pages.

Considering the Wiki for any given repository can be cloned from a command similar to the one below:

git clone

I should be able to get the files and then get their content using the media types the same way as a regular repository. For example, the below endpoint works to get the contents of the file:

But If I wanted to get the wiki content for a specific page I would expect to use this below, but it doesn't work.

What would be the proper way to get the content from a Wiki page rendered as HTML?

1 Reply
Commander Lvl 3
Message 2 of 2

Re: How can I API to get Wiki pages MD or HTML content?

I don't think it's possible with the API, so you'll either have to parse the Markdown yourself (don't worry, your language probably has a library for it), or scrape it from the rendered wiki page.

- Mark