Skip to content

Latest commit

 

History

History
395 lines (233 loc) · 14.1 KB

TeamsApi.md

File metadata and controls

395 lines (233 loc) · 14.1 KB

\TeamsApi

All URIs are relative to https://api.bitbucket.org/2.0

Method HTTP request Description
TeamsGet Get /teams
TeamsUsernameFollowersGet Get /teams/{username}/followers
TeamsUsernameFollowingGet Get /teams/{username}/following
TeamsUsernameGet Get /teams/{username}
TeamsUsernameHooksGet Get /teams/{username}/hooks
TeamsUsernameHooksPost Post /teams/{username}/hooks
TeamsUsernameHooksUidDelete Delete /teams/{username}/hooks/{uid}
TeamsUsernameHooksUidGet Get /teams/{username}/hooks/{uid}
TeamsUsernameHooksUidPut Put /teams/{username}/hooks/{uid}
TeamsUsernameMembersGet Get /teams/{username}/members
TeamsUsernameRepositoriesGet Get /teams/{username}/repositories
UsersUsernameMembersGet Get /users/{username}/members
UsersUsernameRepositoriesGet Get /users/{username}/repositories

TeamsGet

PaginatedTeams TeamsGet(ctx, optional)

Returns all the teams that the authenticated user is associated with.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
optional map[string]interface{} optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a map[string]interface{}.

Name Type Description Notes
role string Filters the teams based on the authenticated user's role on each team. * member: returns a list of all the teams which the caller is a member of at least one team group or repository owned by the team * contributor: returns a list of teams which the caller has write access to at least one repository owned by the team * admin: returns a list teams which the caller has team administrator access

Return type

PaginatedTeams

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TeamsUsernameFollowersGet

PaginatedUsers TeamsUsernameFollowersGet(ctx, username)

Returns the list of accounts that are following this team.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string The team's username

Return type

PaginatedUsers

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TeamsUsernameFollowingGet

PaginatedUsers TeamsUsernameFollowingGet(ctx, username)

Returns the list of accounts this team is following.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string The team's username

Return type

PaginatedUsers

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TeamsUsernameGet

Team TeamsUsernameGet(ctx, username)

Gets the public information associated with a team. If the team's profile is private, location, website and created_on elements are omitted.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string The team's username or UUID.

Return type

Team

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TeamsUsernameHooksGet

PaginatedWebhookSubscriptions TeamsUsernameHooksGet(ctx, username)

Returns a paginated list of webhooks installed on this team.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string

Return type

PaginatedWebhookSubscriptions

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TeamsUsernameHooksPost

WebhookSubscription TeamsUsernameHooksPost(ctx, username)

Creates a new webhook on the specified team. Team webhooks are fired for events from all repositories belonging to that team account. Note that only admins can install webhooks on teams.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string

Return type

WebhookSubscription

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TeamsUsernameHooksUidDelete

TeamsUsernameHooksUidDelete(ctx, username, uid)

Deletes the specified webhook subscription from the given team account.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string
uid string The installed webhook's id

Return type

(empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TeamsUsernameHooksUidGet

WebhookSubscription TeamsUsernameHooksUidGet(ctx, username, uid)

Returns the webhook with the specified id installed on the given team account.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string
uid string The installed webhook's id.

Return type

WebhookSubscription

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TeamsUsernameHooksUidPut

WebhookSubscription TeamsUsernameHooksUidPut(ctx, username, uid)

Updates the specified webhook subscription. The following properties can be mutated: * description * url * active * events

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string
uid string The installed webhook's id

Return type

WebhookSubscription

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TeamsUsernameMembersGet

User TeamsUsernameMembersGet(ctx, username)

Returns all members of the specified team. Any member of any of the team's groups is considered a member of the team. This includes users in groups that may not actually have access to any of the team's repositories. This operation has been deprecated due to privacy changes. See the announcement for details.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string

Return type

User

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TeamsUsernameRepositoriesGet

ModelError TeamsUsernameRepositoriesGet(ctx, username)

All repositories owned by a user/team. This includes private repositories, but filtered down to the ones that the calling user has access to.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string

Return type

ModelError

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UsersUsernameMembersGet

User UsersUsernameMembersGet(ctx, username)

Returns all members of the specified team. Any member of any of the team's groups is considered a member of the team. This includes users in groups that may not actually have access to any of the team's repositories. This operation has been deprecated due to privacy changes. See the announcement for details.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string

Return type

User

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UsersUsernameRepositoriesGet

ModelError UsersUsernameRepositoriesGet(ctx, username)

All repositories owned by a user/team. This includes private repositories, but filtered down to the ones that the calling user has access to.

Required Parameters

Name Type Description Notes
ctx context.Context context for logging, tracing, authentication, etc.
username string

Return type

ModelError

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]