privileges Resource

このページの内容

概要

Use this resource to manage privilege settings for a team account. Team accounts can grant groups account privileges as well as repository access. Groups with account privileges are those with can administer this account (admin rights) or can create repositories in this account (collaborator rights) checked:

Do individual accounts support these calls?

You can make these calls on an individual account but the result is an empty set. This is because individual accounts do not let you set account privileges.

To add members to groups, see group-privileges Endpoint and the privileges Endpoint.

GET a list of privilege groups on a team account

Gets the groups with account privileges defined for a team account. Administer rights automatically include collaborator rights. If you have a group without either option set, it is omitted from the results. The caller must authenticate. The access credentials must come from an account with owner or administrative privileges — either the team account access credentials or a member who can administer the team account. This method takes the following parameters:

パラメーター
必須かどうか
説明
accountname はい The team or individual account name.
group_slug はい The group's slug.
GET https://api.bitbucket.org/1.0/users/{accountname}/privileges
ここをクリックして展開...
{
    "2team/administrators": "admin",
    "2team/developers": "collaborator"
}

GET the privileges associated with a group

Gets the privilege associated with the specified groupname. The privilege is can be either collaborator or admin. The caller must authenticate. The access credentials must come from an account with owner or administrative privileges — either the team account access credentials or a member who can administer the team account. This method takes the following parameters:

パラメーター
必須かどうか
説明
accountname はい The team or individual account name.
所有者 はい The account that owns the group.
group_slug はい The group's slug.
GET https://api.bitbucket.org/1.0/users/{accountname}/privileges/{owner}/{group_slug}
ここをクリックして展開...
{
    "privilege": "collaborator"
}

Updates a group's privileges on a team account

Updates an existing group's privileges for a team account. You can set a group's privileges to admin or collaborator. This call returns the changed group. The caller must authenticate. The access credentials must come from an account with owner or administrative privileges — either the team account access credentials or a member who can administer the team account. This method takes the following parameters:

パラメーター
必須かどうか
説明
accountname はい The team or individual account name.
所有者 はい The account that owns the group.
group_slug はい The group's slug.
privileges はい Either admin or collaborator.
PUT https://api.bitbucket.org/1.0/users/{accountname}/privileges/{owner}/{group_slug} --data "privileges=admin"
ここをクリックして展開...
{
    "2team/contractors": "admin"
}

POST a new privilege

Adds a privilege to a group without any. The caller must authenticate. The access credentials must come from an account with owner or administrative privileges — either the team account access credentials or a member who can administer the team account. This method takes the following parameters:

パラメーター
必須かどうか
説明
accountname はい The team or individual account name.
所有者 はい The account that owns the group.
group_slug はい The group's slug.
privileges はい Either admin or collaborator.
 POST https://api.bitbucket.org/1.0/users/{accountname}/privileges/{owner}/{group_slug} --data "privileges=admin"
ここをクリックして展開...
{
    "2team/contractors": "admin"
}

 

DELETE a privilege group

Deletes a privilege. The caller must authenticate. The access credentials must come from an account with owner or administrative privileges — either the team account access credentials or a member who can administer the team account. This method takes the following parameters:

パラメーター
必須かどうか
説明
accountname はい The team or individual account name.
所有者 はい The account that owns the group.
group_slug はい The group's slug.
DELETE https://api.bitbucket.org/1.0/users/{accountname}/privileges/{owner}/{group_slug} 

On success, this call returns  HTTP/1.1 204 NO CONTENT .

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

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

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

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

コミュニティへの質問

Powered by Confluence and Scroll Viewport.