Bitbucket Documentation

Index

Skip to end of metadata
Go to start of metadata

The bitbucket 'wiki' REST resource provides functionality for getting information from pages in the bitbucket wiki, creating new pages and updating them.

Getting the Raw Content of a Wiki Page

GET /repositories/USERNAME/REPO_SLUG/wiki/PAGE/

Parameters:

  • USERNAME: The owner's username.
  • REPO_SLUG: The slug of the repository.
  • PAGE: The title of the page to get. Do not include the extension .wiki. If not given, the default is 'Home'.

Response:

  • data: contains the contents of the wiki page
  • rev: is the current revision of the wiki page, can optionally be provided when updating a pages contents

Creating a New Wiki Page

POST /repositories/USERNAME/REPO_SLUG/wiki/PAGE/

Parameters:

  • USERNAME: The owner's username.
  • REPO_SLUG: The slug of the repository.
  • PAGE: The title of the page to get. Do not include the extension .wiki.

Use the following form parameter to specify the content of the page:

  • data: The page content.

Updating a Wiki Page

PUT /repositories/USERNAME/REPO_SLUG/wiki/PAGE/

Parameters:

  • USERNAME: The owner's username.
  • REPO_SLUG: The slug of the repository.
  • PAGE: The title of the page to get. Do not include the extension .wiki.

Use the following query string parameter to specify the content of the issue:

  • data: The page content.
  • rev (optional): The revision of the file before it was modified. This should be provided if you want bitbucket to stop concurrent modifications to an individual wiki page. If omitted bitbucket will assume that your contents should overwrite any contents that currently exist. If you provide the rev and the wiki pages current rev does not match then your edit will fail. 
RELATED TOPICS

Using the bitbucket REST APIs

Labels
  • None