Skip to content

Latest commit

 

History

History
949 lines (711 loc) · 31.3 KB

TeamsApi.md

File metadata and controls

949 lines (711 loc) · 31.3 KB

Itofinity.Bitbucket.Rest.Api.TeamsApi

All URIs are relative to https://api.localhost:8000/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 (string role = null)

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

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var role = role_example;  // 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  (optional) 

            try
            {
                PaginatedTeams result = apiInstance.TeamsGet(role);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsGet: " + e.Message );
            }
        }
    }
}

Parameters

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 [optional]

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 (string username)

Returns the list of accounts that are following this team.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsUsernameFollowersGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | The team's username

            try
            {
                PaginatedUsers result = apiInstance.TeamsUsernameFollowersGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsUsernameFollowersGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
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 (string username)

Returns the list of accounts this team is following.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsUsernameFollowingGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | The team's username

            try
            {
                PaginatedUsers result = apiInstance.TeamsUsernameFollowingGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsUsernameFollowingGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
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 (string username)

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

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsUsernameGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | The team's username or UUID.

            try
            {
                Team result = apiInstance.TeamsUsernameGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsUsernameGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
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 (string username)

Returns a paginated list of webhooks installed on this team.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsUsernameHooksGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | 

            try
            {
                PaginatedWebhookSubscriptions result = apiInstance.TeamsUsernameHooksGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsUsernameHooksGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
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 (string 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.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsUsernameHooksPostExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | 

            try
            {
                WebhookSubscription result = apiInstance.TeamsUsernameHooksPost(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsUsernameHooksPost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
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

void TeamsUsernameHooksUidDelete (string username, string uid)

Deletes the specified webhook subscription from the given team account.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsUsernameHooksUidDeleteExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | 
            var uid = uid_example;  // string | The installed webhook's id

            try
            {
                apiInstance.TeamsUsernameHooksUidDelete(username, uid);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsUsernameHooksUidDelete: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string
uid string The installed webhook's id

Return type

void (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 (string username, string uid)

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

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsUsernameHooksUidGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | 
            var uid = uid_example;  // string | The installed webhook's id.

            try
            {
                WebhookSubscription result = apiInstance.TeamsUsernameHooksUidGet(username, uid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsUsernameHooksUidGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
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 (string username, string uid)

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

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsUsernameHooksUidPutExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | 
            var uid = uid_example;  // string | The installed webhook's id

            try
            {
                WebhookSubscription result = apiInstance.TeamsUsernameHooksUidPut(username, uid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsUsernameHooksUidPut: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
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 (string username)

All members of a team. 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. Note that members using the "private profile" feature are not included.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsUsernameMembersGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | 

            try
            {
                User result = apiInstance.TeamsUsernameMembersGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsUsernameMembersGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
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

Error TeamsUsernameRepositoriesGet (string 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.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class TeamsUsernameRepositoriesGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | 

            try
            {
                Error result = apiInstance.TeamsUsernameRepositoriesGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.TeamsUsernameRepositoriesGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string

Return type

Error

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 (string username)

All members of a team. 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. Note that members using the "private profile" feature are not included.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class UsersUsernameMembersGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | 

            try
            {
                User result = apiInstance.UsersUsernameMembersGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.UsersUsernameMembersGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
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

Error UsersUsernameRepositoriesGet (string 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.

Example

using System;
using System.Diagnostics;
using Itofinity.Bitbucket.Rest.Api;
using Itofinity.Bitbucket.Rest.Client;
using Itofinity.Bitbucket.Rest.Model;

namespace Example
{
    public class UsersUsernameRepositoriesGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
            // Configure HTTP basic authorization: basic
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TeamsApi();
            var username = username_example;  // string | 

            try
            {
                Error result = apiInstance.UsersUsernameRepositoriesGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TeamsApi.UsersUsernameRepositoriesGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
username string

Return type

Error

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]