invitations Resource

このページの内容

概要

An invitation is a request sent to an external email address to participate one or more of an account's groups. Any user with admin access to the account can invite someone to a group. An invitation consists of the following fields:

フィールド 説明
グループ One or more of the account's groups that the person was invited to.
invited by The user profile of the user issuing the invitation.
utc_sent_on A UTC value representing when the invitation was issued.
email The external email on the invite

GET a list of pending invitations

Gets a list of pending invitations on a team or individual account. This call requires authorization and the caller must have administrative rights on the account. This call takes the following parameters:

パラメーター 必須 説明
accountname はい The name of an individual or team account.
GET https://api.bitbucket.org/1.0/users/{accountname}
ここをクリックして展開...

The call returns an array of invitations.

[
    {
        "groups": [
            "buserbb/testgroup"
        ],
        "invited_by": {
            "username": "buserbb",
            "first_name": "B",
            "last_name": "userbb",
            "is_team": false,
            "avatar": "https://secure.gravatar.com/avatar/b677e1e3bf1c781f852b288fd4b68480?d=identicon&s=32",
            "resource_uri": "/1.0/users/buserbb"
        },
        "utc_sent_on": "2012-07-19 16:22:51+00:00",
        "email": "joe789@yahoo.com"
    },
    {
        "groups": [
            "buserbb/testgroup",
            "buserbb/newgroup"
        ],
        "invited_by": {
            "username": "buserbb",
            "first_name": "B",
            "last_name": "userbb",
            "is_team": false,
            "avatar": "https://secure.gravatar.com/avatar/b677e1e3bf1c781f852b288fd4b68480?d=identicon&s=32",
            "resource_uri": "/1.0/users/buserbb"
        },
        "utc_sent_on": "2012-07-19 16:20:04+00:00",
        "email": "sally_jones@gmail.com"
    }
]

GET pending invitations for a particular email address

Gets any pending invitations on a team or individual account for a particular email address. Any user with admin access to the account can invite someone to a group. This call requires authorization and the caller must have administrative rights on the account. This call takes the following parameters:

パラメーター 必須 説明
accountname はい The name of an individual or team account.
email_address はい The email address to get.
GET https://api.bitbucket.org/1.0/users/{accountname}/invitations/{email_address}
ここをクリックして展開...
{
    "groups": [
        "buserbb/testgroup",
        "buserbb/newgroup"
    ],
    "invited_by": {
        "username": "buserbb",
        "first_name": "B",
        "last_name": "userbb",
        "is_team": false,
        "avatar": "https://secure.gravatar.com/avatar/b677e1e3bf1c781f852b288fd4b68480?d=identicon&s=32",
        "resource_uri": "/1.0/users/buserbb"
    },
    "utc_sent_on": "2012-07-19 16:20:04+00:00",
    "email": "sally_jones@gmail.com"
}

GET a pending invitation for group membership

Tests whether there is a pending invitation for a particular email on account's group. An invitation is a request sent to an external email address to participate one or more of an account's groups. Any user with admin access to the account can invite someone to a group. This call requires authorization and the caller must have administrative rights on the account. This call takes the following parameters:

パラメーター 必須かどうか 説明
accountname はい The name of an individual or team account.
group_owner はい The name of an individual or team account that owns the group.
group_slug はい An identifier for the group. The  slug  is an identifier constructed by the Bitbucket service. Bitbucket creates a  slug  by converting spaces to dashes and making all text lower case.
email_address はい Name of the email address to delete.
GET https://api.bitbucket.org/1.0/users/{accountname}/invitations/{email_address}/{group_owner}/{group_slug} 
ここをクリックして展開...

This call returns OK if a invitation exists.

OK

Otherwise, it returns Not Found.

Not found

Issue an invitation to a group.

Issues an invitation to the specified account group. An invitation is a request sent to an external email address to participate one or more of an account's groups. Any user with admin access to the account can invite someone to a group. This call requires authorization and the caller must have administrative rights on the account. This call does not check validate the email address.

When making this call, you must provide a Content-Length header even if the length is 0 (zero). This call takes the following parameters:

パラメーター 必須かどうか 説明
accountname はい The name of an individual or team account.
group_owner はい The name of an individual or team account that owns the group.
group_slug はい An identifier for the group. The  slug  is an identifier constructed by the Bitbucket service. Bitbucket creates a  slug  by converting spaces to dashes and making all text lower case.
email_address はい Name of the email address to delete.
PUT https://api.bitbucket.org/1.0/users/{accountname}/invitations/{email_address}/{group_owner}/{group_slug}
ここをクリックして展開...

This call returns OK if the invitation succeeds.

OK

Otherwise, it returns Not Found if specified group_slug does not exist.

Not found

DELETE pending invitations by email address

Deletes any pending invitations on a team or individual account for a particular email address. An invitation is a request sent to an external email address to participate one or more of an account's groups. If a email is invited on multiple groups, the invitation is removed from all groups. This call requires authorization and the caller must have administrative rights on the account. This call takes the following parameters:

パラメーター 必須かどうか 説明
accountname はい The name of an individual or team account.
email_address はい Name of the email address to delete.
DELETE https://api.bitbucket.org/1.0/users/{accountname}/invitations/{email_address}

Upon success, this call returns 204 NO CONTENT.

DELETE pending invitation by group 

Deletes a pending invitation for a particular email on account's group. An invitation is a request sent to an external email address to participate one or more of an account's groups. Any user with admin access to the account can invite someone to a group. This call requires authorization and the caller must have administrative rights on the account. This call takes the following parameters:

パラメーター 必須かどうか 説明
accountname はい The name of an individual or team account.
group_owner はい The name of an individual or team account that owns the group.
group_slug はい An identifier for the group. The  slug  is an identifier constructed by the Bitbucket service. Bitbucket creates a  slug  by converting spaces to dashes and making all text lower case.
email_address はい Name of the email address to delete.
  DELETE   https://api.bitbucket.org/1.0/users/{accountname}/invitations/{email_address}/{group_owner}/{group_slug} 

Upon success, this call returns 204 NO CONTENT.

 

最終更新日: 2015 年 12 月 22 日

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

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

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

コミュニティへの質問

Powered by Confluence and Scroll Viewport.