wiki リソース

Still need help?

アトラシアン コミュニティをご利用ください。

コミュニティへの質問

Bitbucket Cloud v1 APIs are deprecated

Bitbucket Cloud REST API version 1 is deprecated effective 30 June 2018. All 1.0 APIs will be removed from the REST API permanently on 31 December 2018. Read the deprecation notice. Or you can jump right to the version 2.0 REST API documentation.

概要

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:

  • マークダウン
  • 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 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"
最終更新日 2018 年 1 月 14 日

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

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.