emails リソース

このページの内容

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.

概要

An account can have one or more email addresses associated with it. Use this end point to list, change, or create an email address. This resource has the following fields:

フィールド 説明
アクティブ Boolean indicating the user confirmed the email address (true). While this flag is false, Bitbucket does not use the email address to do such things as linking changesets back to an account.
email The email address.
primary Boolean indicating the email is the primary (true). The primary address is the main contact email address for the account. If an account has multiple email addresses, only one address can be primary.

GET a list of user's email addresses

Gets the email addresses associated with the account. This call requires authentication. The possible return fields are the same for both individual and team accounts. This call takes the following parameters:

パラメーター 必須 説明
accountname はい 個人またはチーム アカウントの名前。
GET https://api.bitbucket.org/1.0/users/{accountname}/emails
ここをクリックして展開...
[
    {
        "active": true,
        "email": "2team.bb@gmail.com",
        "primary": true
    },
    {
        "active": false,
        "email": "ourteam@gmail.com",
        "primary": false
    }
]

GET an email address

Gets an individual email address associated with an account. This call requires authentication. This call takes the following parameters:

パラメーター 必須 説明
accountname はい 個人またはチーム アカウントの名前。
email_address はい 取得するメール アドレス。
GET https://api.bitbucket.org/1.0/users/{accountname}/emails/{email_address}
ここをクリックして展開...
{
        "active": false,
        "email": "ourteam@gmail.com",
        "primary": false
}

POST a new email address

Adds additional email addresses to an account. This call requires authentication. After an account has multiple email addresses, you can use the PUT call below to set one of the addresses to primary. This call takes the following parameters:

パラメーター 必須 説明
accountname はい 個人またはチーム アカウントの名前。
email_address はい 取得するメール アドレス。

When you add an address, Bitbucket sends an activation email to the new address. After the user clicks the activation link in the email, the address active is set to true and the address is available for use. If you make the POST call again, Bitbucket sends a new confirmation email with a new and sets the active value to false. The newly sent activation link supersedes the link in any previous emails.

Due to caching, it can take some time for all relevant pages on the site to reflect the new address.

POST https://api.bitbucket.org/1.0/users/{accountname}/emails/{email_address} --data"email=value"
ここをクリックして展開...
[
    {
        "active": true,
        "email": "2team.bb@gmail.com",
        "primary": true
    },
    {
        "active": false,
        "email": "ourteam@gmail.com",
        "primary": false
    }
]

Update an email address

Sets an individual email address associated with an account to primary. The primary email address is the main email contact for the account. Only a single address on an account can be primary. If another address had primary set prior to this call, after it is no longer primary. This call requires authentication and takes the following parameters:

パラメーター 必須 説明
accountname はい 個人またはチーム アカウントの名前。
email_address はい 取得するメール アドレス。
PUT https://api.bitbucket.org/1.0/users/{accountname}/emails/{email_address} --data "primary=true"
ここをクリックして展開...
{
        "active": true,
        "email": "ourteam@gmail.com",
        "primary": true
}
最終更新日 2018 年 1 月 14 日

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

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