Show markup used in wiki page via API

Issue #7197 resolved
Juha Kuitunen
created an issue

You can get raw contents of a wiki page via API with GET repositories/{accountname}/{repo_slug}/wiki/{page}. It does not tell which of the supported markups (Markdown, reStructuredText, Textile, Creole) is used on that page. I guess you can get it by cloning wiki and looking by file extensions but that is not very practical. :)

This has been previously asked in documentation in January but I did not see any reference to it here in issue tracker.

Comments (4)

  1. Brodie Rao

    Hi Juha,

    Thanks for the report!

    I've put out a change that exposes this through the API. There's now a "markup" field in the response that can either be 'markdown', 'creole', 'rest', 'textile', or null. This will be populated based on what Bitbucket guessed the file type to be, so it may not always guess it correctly. In particular, file types with no extension will be reported as 'markdown'.

    We'll update the API docs shortly to reflect this change.

  2. Log in to comment