Skip to content

Latest commit

 

History

History
158 lines (91 loc) · 8.04 KB

ProjectsApi.md

File metadata and controls

158 lines (91 loc) · 8.04 KB

\ProjectsApi

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}

TeamsUsernameProjectsGet

PaginatedProjects TeamsUsernameProjectsGet(ctx, username)

Required Parameters

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.

Return type

PaginatedProjects

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]

TeamsUsernameProjectsPost

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 }

Required Parameters

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

Return type

Project

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]

TeamsUsernameProjectsProjectKeyDelete

TeamsUsernameProjectsProjectKeyDelete(ctx, username, projectKey)

Required Parameters

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 (`{}`)).

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]

TeamsUsernameProjectsProjectKeyGet

Project TeamsUsernameProjectsProjectKeyGet(ctx, username, projectKey)

Required Parameters

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 (`{}`)).

Return type

Project

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]

TeamsUsernameProjectsProjectKeyPut

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.

Required Parameters

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

Return type

Project

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]