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} |
PaginatedProjects TeamsUsernameProjectsGet(ctx, username)
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
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. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project TeamsUsernameProjectsPost(ctx, username, body)
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 }
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
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. | |
body | Project |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TeamsUsernameProjectsProjectKeyDelete(ctx, username, projectKey)
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
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. | |
projectKey | string | The project in question. This can either be the actual `key` assigned to the project or the `UUID` (surrounded by curly-braces (`{}`)). |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project TeamsUsernameProjectsProjectKeyGet(ctx, username, projectKey)
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
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. | |
projectKey | string | The project in question. This can either be the actual `key` assigned to the project or the `UUID` (surrounded by curly-braces (`{}`)). |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project TeamsUsernameProjectsProjectKeyPut(ctx, username, projectKey, body)
Since this endpoint can be used to both update and to create a project, the request body depends on the intent. ### 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.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for logging, tracing, authentication, etc. | |
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. | |
projectKey | string | The project in question. This can either be the actual `key` assigned to the project or the `UUID` (surrounded by curly-braces (`{}`)). | |
body | Project |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]