All URIs are relative to https://api.bitbucket.org/2.0
Method | HTTP request | Description |
---|---|---|
teamsUsernameProjectsGet | GET /teams/{username}/projects/ | |
teamsUsernameProjectsPost | POST /teams/{username}/projects/ | |
teamsUsernameProjectsProjectKeyDelete | DELETE /teams/{username}/projects/{project_key} | |
teamsUsernameProjectsProjectKeyGet | GET /teams/{username}/projects/{project_key} | |
teamsUsernameProjectsProjectKeyPut | PUT /teams/{username}/projects/{project_key} | |
workspacesWorkspaceProjectsPost | POST /workspaces/{workspace}/projects | |
workspacesWorkspaceProjectsProjectKeyDelete | DELETE /workspaces/{workspace}/projects/{project_key} | |
workspacesWorkspaceProjectsProjectKeyGet | GET /workspaces/{workspace}/projects/{project_key} | |
workspacesWorkspaceProjectsProjectKeyPut | PUT /workspaces/{workspace}/projects/{project_key} |
PaginatedProjects teamsUsernameProjectsGet(username)
The teams endpoint for projects has been deprecated, and you should ensure you are using the workspaces endpoint. For more information, see the announcement.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.ProjectsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
ProjectsApi apiInstance = new ProjectsApi();
String username = "username_example"; // String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
try {
PaginatedProjects result = apiInstance.teamsUsernameProjectsGet(username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#teamsUsernameProjectsGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
username | String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. |
Project teamsUsernameProjectsPost(body, username)
Creates a new project. The teams endpoint for projects has been deprecated, and you should ensure you are using the workspaces endpoint. For more information, see the announcement. Note that the avatar has to be embedded as either a data-url or a URL to an external image as shown in the examples below: ``` $ body=$(cat << EOF { \"name\": \"Mars Project\", \"key\": \"MARS\", \"description\": \"Software for colonizing mars.\", \"links\": { \"avatar\": { \"href\": \"data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/…\" } }, \"is_private\": false } EOF ) $ curl -H \"Content-Type: application/json\" \ -X POST \ -d \"$body\" \ https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq . { // Serialized project document } ``` or even: ``` $ body=$(cat << EOF { \"name\": \"Mars Project\", \"key\": \"MARS\", \"description\": \"Software for colonizing mars.\", \"links\": { \"avatar\": { \"href\": \"http://i.imgur.com/72tRx4w.gif\" } }, \"is_private\": false } EOF ) $ curl -H \"Content-Type: application/json\" \ -X POST \ -d \"$body\" \ https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq . { // Serialized project document } ``` |
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.ProjectsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
ProjectsApi apiInstance = new ProjectsApi();
Project body = new Project(); // Project |
String username = "username_example"; // String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
try {
Project result = apiInstance.teamsUsernameProjectsPost(body, username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#teamsUsernameProjectsPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Project | ||
username | String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. |
teamsUsernameProjectsProjectKeyDelete(projectKey, username)
The teams endpoint for projects has been deprecated, and you should ensure you are using the workspaces endpoint. For more information, see the announcement.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.ProjectsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
ProjectsApi apiInstance = new ProjectsApi();
String projectKey = "projectKey_example"; // String | The project in question. This can either be the actual `key` assigned to the project or the `UUID` (surrounded by curly-braces (`{}`)).
String username = "username_example"; // String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
try {
apiInstance.teamsUsernameProjectsProjectKeyDelete(projectKey, username);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#teamsUsernameProjectsProjectKeyDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project in question. This can either be the actual `key` assigned to the project or the `UUID` (surrounded by curly-braces (`{}`)). | |
username | String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. |
null (empty response body)
Project teamsUsernameProjectsProjectKeyGet(projectKey, username)
The teams endpoint for projects has been deprecated, and you should ensure you are using the workspaces endpoint. For more information, see the announcement.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.ProjectsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
ProjectsApi apiInstance = new ProjectsApi();
String projectKey = "projectKey_example"; // String | The project in question. This can either be the actual `key` assigned to the project or the `UUID` (surrounded by curly-braces (`{}`)).
String username = "username_example"; // String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
try {
Project result = apiInstance.teamsUsernameProjectsProjectKeyGet(projectKey, username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#teamsUsernameProjectsProjectKeyGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project in question. This can either be the actual `key` assigned to the project or the `UUID` (surrounded by curly-braces (`{}`)). | |
username | String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. |
Project teamsUsernameProjectsProjectKeyPut(body, projectKey, username)
Since this endpoint can be used to both update and to create a project, the request body depends on the intent. The teams endpoint for projects has been deprecated, and you should ensure you are using the workspaces endpoint. For more information, see the announcement. ### Creation See the POST documentation for the project collection for an example of the request body. Note: The `key` should not be specified in the body of request (since it is already present in the URL). The `name` is required, everything else is optional. ### Update See the POST documentation for the project collection for an example of the request body. Note: The key is not required in the body (since it is already in the URL). The key may be specified in the body, if the intent is to change the key itself. In such a scenario, the location of the project is changed and is returned in the `Location` header of the response.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.ProjectsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
ProjectsApi apiInstance = new ProjectsApi();
Project body = new Project(); // Project |
String projectKey = "projectKey_example"; // String | The project in question. This can either be the actual `key` assigned to the project or the `UUID` (surrounded by curly-braces (`{}`)).
String username = "username_example"; // String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user.
try {
Project result = apiInstance.teamsUsernameProjectsProjectKeyPut(body, projectKey, username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#teamsUsernameProjectsProjectKeyPut");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Project | ||
projectKey | String | The project in question. This can either be the actual `key` assigned to the project or the `UUID` (surrounded by curly-braces (`{}`)). | |
username | String | This can either be the username or the UUID of the account, surrounded by curly-braces, for example: `{account UUID}`. An account is either a team or user. |
Project workspacesWorkspaceProjectsPost(body, workspace)
Creates a new project. Note that the avatar has to be embedded as either a data-url or a URL to an external image as shown in the examples below: ``` $ body=$(cat << EOF { \"name\": \"Mars Project\", \"key\": \"MARS\", \"description\": \"Software for colonizing mars.\", \"links\": { \"avatar\": { \"href\": \"data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/…\" } }, \"is_private\": false } EOF ) $ curl -H \"Content-Type: application/json\" \ -X POST \ -d \"$body\" \ https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq . { // Serialized project document } ``` or even: ``` $ body=$(cat << EOF { \"name\": \"Mars Project\", \"key\": \"MARS\", \"description\": \"Software for colonizing mars.\", \"links\": { \"avatar\": { \"href\": \"http://i.imgur.com/72tRx4w.gif\" } }, \"is_private\": false } EOF ) $ curl -H \"Content-Type: application/json\" \ -X POST \ -d \"$body\" \ https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq . { // Serialized project document } ``` |
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.ProjectsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
ProjectsApi apiInstance = new ProjectsApi();
Project body = new Project(); // Project |
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.
try {
Project result = apiInstance.workspacesWorkspaceProjectsPost(body, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#workspacesWorkspaceProjectsPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Project | ||
workspace | String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
workspacesWorkspaceProjectsProjectKeyDelete(projectKey, workspace)
Deletes this project. This is an irreversible operation. You cannot delete a project that still contains repositories. To delete the project, delete or transfer the repositories first. Example: ``` $ curl -X DELETE https://api.bitbucket.org/2.0/bbworkspace1/PROJ ```
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.ProjectsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
ProjectsApi apiInstance = new ProjectsApi();
String projectKey = "projectKey_example"; // String | The project in question. This is the actual `key` assigned to the project.
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.
try {
apiInstance.workspacesWorkspaceProjectsProjectKeyDelete(projectKey, workspace);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#workspacesWorkspaceProjectsProjectKeyDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project in question. This is the actual `key` assigned to the project. | |
workspace | String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
null (empty response body)
Project workspacesWorkspaceProjectsProjectKeyGet(projectKey, workspace)
Returns the requested project.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.ProjectsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
ProjectsApi apiInstance = new ProjectsApi();
String projectKey = "projectKey_example"; // String | The project in question. This is the actual `key` assigned to the project.
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.
try {
Project result = apiInstance.workspacesWorkspaceProjectsProjectKeyGet(projectKey, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#workspacesWorkspaceProjectsProjectKeyGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project in question. This is the actual `key` assigned to the project. | |
workspace | String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |
Project workspacesWorkspaceProjectsProjectKeyPut(body, projectKey, workspace)
Since this endpoint can be used to both update and to create a project, the request body depends on the intent. The teams endpoint for projects has been deprecated, and you should ensure you are using the workspaces endpoint. For more information, see the announcement. ### Creation See the POST documentation for the project collection for an example of the request body. Note: The `key` should not be specified in the body of request (since it is already present in the URL). The `name` is required, everything else is optional. ### Update See the POST documentation for the project collection for an example of the request body. Note: The key is not required in the body (since it is already in the URL). The key may be specified in the body, if the intent is to change the key itself. In such a scenario, the location of the project is changed and is returned in the `Location` header of the response.
// Import classes:
//import com.rappi.bitbucket.client.invoker.ApiClient;
//import com.rappi.bitbucket.client.invoker.ApiException;
//import com.rappi.bitbucket.client.invoker.Configuration;
//import com.rappi.bitbucket.client.invoker.auth.*;
//import com.rappi.bitbucket.client.api.ProjectsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
ProjectsApi apiInstance = new ProjectsApi();
Project body = new Project(); // Project |
String projectKey = "projectKey_example"; // String | The project in question. This is the actual `key` assigned to the project.
String workspace = "workspace_example"; // String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.
try {
Project result = apiInstance.workspacesWorkspaceProjectsProjectKeyPut(body, projectKey, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#workspacesWorkspaceProjectsProjectKeyPut");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Project | ||
projectKey | String | The project in question. This is the actual `key` assigned to the project. | |
workspace | String | This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. |