Bitbucket is getting a new navigation

We’re rolling out these changes, so the documentation may not match your experience in the Bitbucket Cloud app. Read about the new Bitbucket navigation

invitations エンドポイント

Bitbucket Cloud v1 API は廃止予定です

Bitbucket Cloud REST API version 1 is deprecated effective 30 June 2018, and were removed from the REST API permanently on 29 April 2019. Read the deprecation notice. Or you can jump right to the version 2.0 REST API documentation.

限られた 1.0 API リソースの一時的なサポートについて

The 2.0 REST API will rely on the Atlassian Cloud Admin API for user and group management, but those API endpoints are not yet available. Until the Atlassian platform services are fully available in Bitbucket we will continue to support these 1.0 REST endpoints:

  • /1.0/groups

  • /1.0/group-privileges

  • /1.0/invitations

  • /1.0/users/{accountname}/invitations

概要

invitations エンドポイントを使用すると、Bitbucket Cloud リポジトリ管理者はリポジトリに対する読み取り、書き込み、または管理権限を与えるための招待メールを送信できます。ユーザーに送信されるメールには、招待を承認するための URL が含まれます。受信者がメール アドレスに対応する Bitbucket アカウントを既に持っている場合、リポジトリにアクセスするにはそのアカウントにログインする必要があります。ユーザーが Bitbucket アカウントを持っていない場合、ユーザーはリポジトリにアクセスする前に Bitbucket アカウントを作成する必要があります。invitation エンドポイントには次のフィールドがあります。

"sent_on": "2011-01-11 01:03:31", "permission": "write", "invited_by": { "display_name": "Roger", "account_id": "557058:ec25fab6-5844-4b65-a30c-677ecd2ce3b5", "is_team": false, "avatar": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/CS-5.png", "resource_uri": "/api/1.0/users/roger", "nickname": "roger", "uuid": "{746046c8-9d5a-4b86-a414-485452396952}" }, "repository": { "website": "", "read_only": false, "has_wiki": true, "last_updated": "2010-12-24 05:26:20", "name": "ramjet", "language": "", "deleted": false, "is_mq": false, "mq_of": null, "created_on": "2010-12-24 05:26:20", "fork_of": null, "email_writers": true, "size": 4096, "owner": "roger", "has_issues": true, "no_public_forks": false, "email_mailinglist": "", "is_fork": false, "slug": "ramjet", "is_private": true, "description": "" }, "email": "john@example.com" }

これらのフィールドは次のとおりです。

フィールド

説明

sent_on

ユーザーが招待された 1 つ以上のアカウント グループ。

permission

リポジトリに付与された権限。次のいずれかです。

  • read

  • write

  • admin

invited by

招待元ユーザーのユーザー プロファイル。

repository

ユーザーが招待されたリポジトリ。

email

招待の外部メール

POST による招待の送信

POST https://api.bitbucket.org/1.0/invitations/{accountname}/{repo_slug} --data 'permission={permission}' --data 'email={email_address}'

ユーザーをリポジトリに招待します。このメソッドでは次のパラメーターを使用できます。

パラメーター

必須かどうか

説明

accountname

はい

チームまたは個人のアカウント。

repo_slug

はい

そのアカウントに所属しているリポジトリ。

email_address

はい

メール受信者

permission

はい

受信者に付与される権限

john@example.com にリポジトリ roger/ramjet への書き込み権限を付与する招待を送信するには、次のようにします。

$ curl --user roger:password --request POST https://api.bitbucket.org/1.0/invitations/roger/ramjet --data permission=write --data email=john@example.com

応答は次のようになります。

{ "sent_on": "2011-01-11 01:03:31", "permission": "write", "invited_by": { "display_name": "Roger", "account_id": "557058:ec25fab6-5844-4b65-a30c-677ecd2ce3b5", "is_team": false, "avatar": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/CS-5.png", "resource_uri": "/api/1.0/users/roger", "nickname": "roger", "uuid": "{746046c8-9d5a-4b86-a414-485452396952}" }, "repository": { "website": "", "read_only": false, "has_wiki": true, "last_updated": "2010-12-24 05:26:20", "name": "ramjet", "language": "", "deleted": false, "is_mq": false, "mq_of": null, "created_on": "2010-12-24 05:26:20", "fork_of": null, "email_writers": true, "size": 4096, "owner": "roger", "has_issues": true, "no_public_forks": false, "email_mailinglist": "", "is_fork": false, "slug": "ramjet", "is_private": true, "description": "" }, "email": "john@example.com" }

さらにヘルプが必要ですか?

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