wiki Resources

概要

The wiki resource provides functionality for getting information from pages in a Bitbucket wiki, creating new pages, and updating them.

GET the raw content of a Wiki page

Gets the contents of a wiki page and the current revision. You must supply the title of a page to get.  When getting a page, do not include the extension .wiki. If you do not supply a page value, the default is the Home page.

The response contains a markup field in that is one of:

  • markdown
  • creole
  • rest
  • textile
  • null

Bitbucket determines the mark up used in the Wiki based on the page extensions.  The file type may not always be correct in cases where there is no extension; these types appear as markdown.

curl --user accountname:password https://api.bitbucket.org/1.0/repositories/{accountname}/{repo_slug}/wiki/{page}
ここをクリックして展開...

{

"data": "This is inline text: {{{<<file index.html>>}}} followed by more.\n\nTrying to get back to the tutorial for this project? It's here: https://confluence.atlassian.com/display/BITBUCKET/Bitbucket+101\n\n[Two](Two)",

"markup": "markdown",

"rev": "e9247a427a2eba5fa01158ea4aedb6045f2a59dc"

}

POST a new page

Creates a new wiki page. You must supply the following parameters:

パラメーター 説明
ページ Title of the page.
data Content of the page.

The caller must authenticate with an account that has access to the wiki.

curl --user accountname:password https://api.bitbucket.org/1.0/repositories/ {accountname}/{repo_slug}/wiki/{page} --data "content=string"

PUT a page update

Updates an existng wiki page. You can supply the following parameters:

パラメーター 必須 説明
ページ はい Title of the page.
path はい Path to the page.
data はい Content of the page.
rev いいえ

The revision of the file before it was modified. Omit this value to overwrite any contents that currently exist.

Provide this parameter to stop concurrent modifications to an individual wiki page. If you provide the rev and the wiki pages current rev does not match then your edit will fail.

The caller must authenticate with an account that has access to the wiki.

curl --user accountname:password https://api.bitbucket.org/1.0/repositories/ accountname/repo_name/wiki/{page} --data "path={path}&data=string" --data "rev=value"
最終更新日 2016 年 5 月 26 日

この翻訳に満足しましたか?

はい
いいえ
この記事についてのフィードバックを送信する

お探しの情報が見つかりませんか?

コミュニティへの質問

Powered by Confluence and Scroll Viewport.