Skip to content

Latest commit

 

History

History
533 lines (342 loc) · 25.7 KB

DeploymentsApi.md

File metadata and controls

533 lines (342 loc) · 25.7 KB

{{classname}}

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

Method HTTP request Description
CreateEnvironment Post /repositories/{workspace}/{repo_slug}/environments Create an environment
DeleteEnvironmentForRepository Delete /repositories/{workspace}/{repo_slug}/environments/{environment_uuid} Delete an environment
GetDeploymentForRepository Get /repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid} Get a deployment
GetDeploymentsForRepository Get /repositories/{workspace}/{repo_slug}/deployments List deployments
GetEnvironmentForRepository Get /repositories/{workspace}/{repo_slug}/environments/{environment_uuid} Get an environment
GetEnvironmentsForRepository Get /repositories/{workspace}/{repo_slug}/environments List environments
RepositoriesWorkspaceRepoSlugDeployKeysGet Get /repositories/{workspace}/{repo_slug}/deploy-keys List repository deploy keys
RepositoriesWorkspaceRepoSlugDeployKeysKeyIdDelete Delete /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} Delete a repository deploy key
RepositoriesWorkspaceRepoSlugDeployKeysKeyIdGet Get /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} Get a repository deploy key
RepositoriesWorkspaceRepoSlugDeployKeysKeyIdPut Put /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id} Update a repository deploy key
RepositoriesWorkspaceRepoSlugDeployKeysPost Post /repositories/{workspace}/{repo_slug}/deploy-keys Add a repository deploy key
UpdateEnvironmentForRepository Post /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes Update an environment
WorkspacesWorkspaceProjectsProjectKeyDeployKeysGet Get /workspaces/{workspace}/projects/{project_key}/deploy-keys List project deploy keys
WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdDelete Delete /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id} Delete a deploy key from a project
WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdGet Get /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id} Get a project deploy key
WorkspacesWorkspaceProjectsProjectKeyDeployKeysPost Post /workspaces/{workspace}/projects/{project_key}/deploy-keys Create a project deploy key

CreateEnvironment

DeploymentEnvironment CreateEnvironment(ctx, body, workspace, repoSlug) Create an environment

Create an environment.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body DeploymentEnvironment The environment to create.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
repoSlug string The repository.

Return type

DeploymentEnvironment

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]

DeleteEnvironmentForRepository

DeleteEnvironmentForRepository(ctx, workspace, repoSlug, environmentUuid) Delete an environment

Delete an environment

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
repoSlug string The repository.
environmentUuid string The environment UUID.

Return type

(empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

GetDeploymentForRepository

Deployment GetDeploymentForRepository(ctx, workspace, repoSlug, deploymentUuid) Get a deployment

Retrieve a deployment

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
repoSlug string The repository.
deploymentUuid string The deployment UUID.

Return type

Deployment

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

GetDeploymentsForRepository

PaginatedDeployments GetDeploymentsForRepository(ctx, workspace, repoSlug, optional) List deployments

Find deployments

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
repoSlug string The repository.
optional *DeploymentsApiGetDeploymentsForRepositoryOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a DeploymentsApiGetDeploymentsForRepositoryOpts struct

Name Type Description Notes

page | optional.Int32| page |

Return type

PaginatedDeployments

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

GetEnvironmentForRepository

DeploymentEnvironment GetEnvironmentForRepository(ctx, workspace, repoSlug, environmentUuid) Get an environment

Retrieve an environment

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
repoSlug string The repository.
environmentUuid string The environment UUID.

Return type

DeploymentEnvironment

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

GetEnvironmentsForRepository

PaginatedEnvironments GetEnvironmentsForRepository(ctx, workspace, repoSlug, optional) List environments

Find environments

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
repoSlug string The repository.
optional *DeploymentsApiGetEnvironmentsForRepositoryOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a DeploymentsApiGetEnvironmentsForRepositoryOpts struct

Name Type Description Notes

page | optional.Int32| page |

Return type

PaginatedEnvironments

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

RepositoriesWorkspaceRepoSlugDeployKeysGet

PaginatedDeployKeys RepositoriesWorkspaceRepoSlugDeployKeysGet(ctx, repoSlug, workspace, optional) List repository deploy keys

Returns all deploy-keys belonging to a repository.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
repoSlug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.
optional *DeploymentsApiRepositoriesWorkspaceRepoSlugDeployKeysGetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a DeploymentsApiRepositoriesWorkspaceRepoSlugDeployKeysGetOpts struct

Name Type Description Notes

page | optional.Int32| page |

Return type

PaginatedDeployKeys

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

RepositoriesWorkspaceRepoSlugDeployKeysKeyIdDelete

RepositoriesWorkspaceRepoSlugDeployKeysKeyIdDelete(ctx, keyId, repoSlug, workspace) Delete a repository deploy key

This deletes a deploy key from a repository.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
keyId string The key ID matching the deploy key.
repoSlug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.

Return type

(empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

RepositoriesWorkspaceRepoSlugDeployKeysKeyIdGet

DeployKey RepositoriesWorkspaceRepoSlugDeployKeysKeyIdGet(ctx, keyId, repoSlug, workspace) Get a repository deploy key

Returns the deploy key belonging to a specific key.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
keyId string The key ID matching the deploy key.
repoSlug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.

Return type

DeployKey

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

RepositoriesWorkspaceRepoSlugDeployKeysKeyIdPut

DeployKey RepositoriesWorkspaceRepoSlugDeployKeysKeyIdPut(ctx, keyId, repoSlug, workspace) Update a repository deploy key

Create a new deploy key in a repository. The same key needs to be passed in but the comment and label can change. Example: $ curl -X PUT \\ -H \"Authorization <auth header>\" \\ -H \"Content-type: application/json\" \\ https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234 -d \\ '{ \"label\": \"newlabel\", \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 newcomment\", }'

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
keyId string The key ID matching the deploy key.
repoSlug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.

Return type

DeployKey

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

RepositoriesWorkspaceRepoSlugDeployKeysPost

DeployKey RepositoriesWorkspaceRepoSlugDeployKeysPost(ctx, repoSlug, workspace) Add a repository deploy key

Create a new deploy key in a repository. Note: If authenticating a deploy key with an OAuth consumer, any changes to the OAuth consumer will subsequently invalidate the deploy key. Example: $ curl -X POST \\ -H \"Authorization <auth header>\" \\ -H \"Content-type: application/json\" \\ https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys -d \\ '{ \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8\", \"label\": \"mydeploykey\" }'

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
repoSlug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.

Return type

DeployKey

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

UpdateEnvironmentForRepository

UpdateEnvironmentForRepository(ctx, workspace, repoSlug, environmentUuid) Update an environment

Update an environment

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
repoSlug string The repository.
environmentUuid string The environment UUID.

Return type

(empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

WorkspacesWorkspaceProjectsProjectKeyDeployKeysGet

PaginatedProjectDeployKeys WorkspacesWorkspaceProjectsProjectKeyDeployKeysGet(ctx, projectKey, workspace, optional) List project deploy keys

Returns all deploy keys belonging to a project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
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}`.
optional *DeploymentsApiWorkspacesWorkspaceProjectsProjectKeyDeployKeysGetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a DeploymentsApiWorkspacesWorkspaceProjectsProjectKeyDeployKeysGetOpts struct

Name Type Description Notes

page | optional.Int32| page |

Return type

PaginatedProjectDeployKeys

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdDelete

WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdDelete(ctx, keyId, projectKey, workspace) Delete a deploy key from a project

This deletes a deploy key from a project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
keyId string The key ID matching the project deploy key.
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}`.

Return type

(empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdGet

ProjectDeployKey WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdGet(ctx, keyId, projectKey, workspace) Get a project deploy key

Returns the deploy key belonging to a specific key ID.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
keyId string The key ID matching the project deploy key.
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}`.

Return type

ProjectDeployKey

Authorization

api_key, basic, oauth2

HTTP request headers

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

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

WorkspacesWorkspaceProjectsProjectKeyDeployKeysPost

ProjectDeployKey WorkspacesWorkspaceProjectsProjectKeyDeployKeysPost(ctx, projectKey, workspace) Create a project deploy key

Create a new deploy key in a project. Example: $ curl -X POST \\ -H \"Authorization <auth header>\" \\ -H \"Content-type: application/json\" \\ https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/ -d \\ '{ \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8\", \"label\": \"mydeploykey\" }'

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
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}`.

Return type

ProjectDeployKey

Authorization

api_key, basic, oauth2

HTTP request headers

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

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