Use the Bitbucket Cloud REST APIs: https://confluence.atlassian.com/bitbucket/use-the-bitbucket-cloud-rest-apis-222724129.html
$ curl https://api.bitbucket.org/2.0/repositories/{accountname}
OAuth on Bitbucket Cloud: https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html
API 2.0 はトークンが取得できなくて挫折したので、App passwords を設定し API 1.0 で curl を使っていろいろやってみた。
App passwords を設定することでプライベートリポジトリにアクセスできる。
App passwords are here in Bitbucket Cloud: https://blog.bitbucket.org/2016/06/06/app-passwords-bitbucket-cloud/
以下の値はそれぞれ置き換えること
{accountname}:アカウント名
{repo_slug}:レポジトリ名
{app_password}:App passwords のパスワード
GET a user profile: https://confluence.atlassian.com/bitbucket/user-endpoint-296092264.html#userEndpoint-GETauserprofile
$ curl --user {accountname}:{app_password} https://api.bitbucket.org/1.0/user/
GET a list of issues in a repository's tracker: https://confluence.atlassian.com/bitbucket/issues-resource-296095191.html#issuesResource-GETalistofissuesinarepository'stracker
$ curl --user {accountname}:{app_password} https://api.bitbucket.org/1.0/repositories/{accountname}/{repo_slug}/issues
POST a new issue: https://confluence.atlassian.com/bitbucket/issues-resource-296095191.html#issuesResource-POSTanewissue
$ curl --user {accountname}:{app_password} https://api.bitbucket.org/1.0/repositories/{accountname}/{repo_slug}/issues --data "title=タイトルを入力&content=内容を入力&priority=優先度を入力&kind=タイプを入力&responsible=担当者を入力"
今日はここまで...