consumers リソース

このページの内容

お困りですか?

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

コミュニティに質問

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.

概要

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 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 いいえ 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.

最終更新日 2018 年 1 月 14 日

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

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