consumers Resource

このページの内容

 

概要

A consumer is an application authorized to integrate with a Bitbucket account. Account owners or team administrators can give third-party web applications access to a Bitbucket individual account or a team.  By integrating an application with Bitbucket, you authorize that account to act as your user.  So, for example, if you have read/write access to all of the account, the application does as well.  Anything you could do when logged into Bitbucket, that application can also do.

As a consumer is associated with an account, all calls to retrieve consumer information require the caller to authenticate as an owner or administrator on the account.   A consumer instance has the following fields:

{
    "description": "", 
    "id": 22779, 
    "key": "y9spXwJKNcygKdWBH2", 
    "name": "TestDVCS", 
    "secret": "bQWTaGRpT9RhB24TQWYP9M2LcvZy9Pkw", 
    "url": ""
} 

These fields have the following values:

フィールド 説明
説明 Description of this integration. This can be null.
ID An identifier assigned by Bitbucket.
鍵 (キー) An Oauth key generated by Bitbucket.
name Display name for the consumer.
シークレット An Oauth secret generated by Bitbucket.
URL The URL for the consumer. This can be null.

 

GET a list of an account's consumers

Returns an array of consumers integrated with the account.

パラメーター
必須かどうか
説明
accountname はい The team or individual account name.

GET https://api.bitbucket.org/1.0/users/{accountname}/consumers

ここをクリックして展開...
[
    {
        "description": "", 
        "id": 22779, 
        "key": "y9spXwJKNcygKdWBH2", 
        "name": "TestDVCS", 
        "secret": "bQWTaGRpT9RhB24TQWYP9M2LcvZy9Pkw", 
        "url": ""
    }, 
    {
        "description": "test", 
        "id": 27209, 
        "key": "wBLY2HU5yjcD4ncmLj", 
        "name": "test", 
        "secret": "Hw8TAqhpbPHhbBBCFyD8HPS4nm25EGZp", 
        "url": "www.slate.com"
    }
]

GET a consumer

Gets an individual consumer for an account.

パラメーター
必須かどうか
説明
accountname はい The team or individual account name.
ID はい Identifier for the key

 GET https://api.bitbucket.org/1.0/users/{accountname}/{id}

ここをクリックして展開...
{
    "description": "", 
    "id": 22779, 
    "key": "y9spXwJKNcygKdWBH2", 
    "name": "TestDVCS", 
    "secret": "bQWTaGRpT9RhB24TQWYP9M2LcvZy9Pkw", 
    "url": ""
} 

PUT an updated consumer

Updates an individual consumer for an account.  You must supply the consumer's name parameter.

パラメーター
必須かどうか
説明
accountname はい The team or individual account name.
ID はい Identifier for the key
name はい Name of the consumer.
説明 いいえ Description for the consumer.
URL いいえ The URL for the

 PUT https://api.bitbucket.org/1.0/users/{accountname}/{id} -d"name={name}&description={string}&url={url}"

ここをクリックして展開...
{
    "description": "here", 
    "id": 22774, 
    "key": "y6spXwJKNcygKdWBH2", 
    "name": "ralph", 
    "secret": "bQWTaGRpT9RhB24TQWYP9M2LcvZy6Pkw", 
    "url": "foobar.com"
}

DELETES a consumer

Deletes an individual consumer from an account.

パラメーター
必須かどうか
説明
accountname はい The team or individual account name.
ID はい Identifier for the key

DELETE https://api.bitbucket.org/1.0/users/{accountname}/{id}

This call returns 204 No Content on success.

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

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

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

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

コミュニティへの質問

Powered by Confluence and Scroll Viewport.