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 |
DeploymentEnvironment CreateEnvironment(ctx, body, workspace, repoSlug) Create an environment
Create an environment.
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. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteEnvironmentForRepository(ctx, workspace, repoSlug, environmentUuid) Delete an environment
Delete an environment
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. |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Deployment GetDeploymentForRepository(ctx, workspace, repoSlug, deploymentUuid) Get a deployment
Retrieve a deployment
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. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedDeployments GetDeploymentsForRepository(ctx, workspace, repoSlug, optional) List deployments
Find deployments
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 are passed through a pointer to a DeploymentsApiGetDeploymentsForRepositoryOpts struct
Name | Type | Description | Notes |
---|
page | optional.Int32| page |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeploymentEnvironment GetEnvironmentForRepository(ctx, workspace, repoSlug, environmentUuid) Get an environment
Retrieve an environment
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. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedEnvironments GetEnvironmentsForRepository(ctx, workspace, repoSlug, optional) List environments
Find environments
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 are passed through a pointer to a DeploymentsApiGetEnvironmentsForRepositoryOpts struct
Name | Type | Description | Notes |
---|
page | optional.Int32| page |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedDeployKeys RepositoriesWorkspaceRepoSlugDeployKeysGet(ctx, repoSlug, workspace, optional) List repository deploy keys
Returns all deploy-keys belonging to a repository. Example: $ curl -H \"Authorization <auth header>\" \\ https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys Output: { \"pagelen\": 10, \"values\": [ { \"id\": 123, \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\", \"label\": \"mykey\", \"type\": \"deploy_key\", \"created_on\": \"2018-08-15T23:50:59.993890+00:00\", \"repository\": { \"full_name\": \"mleu/test\", \"name\": \"test\", \"type\": \"repository\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"links\":{ \"self\":{ \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123\" } } \"last_used\": null, \"comment\": \"mleu@C02W454JHTD8\" } ], \"page\": 1, \"size\": 1 }
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 are passed through a pointer to a DeploymentsApiRepositoriesWorkspaceRepoSlugDeployKeysGetOpts struct
Name | Type | Description | Notes |
---|
page | optional.Int32| page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoriesWorkspaceRepoSlugDeployKeysKeyIdDelete(ctx, keyId, repoSlug, workspace) Delete a repository deploy key
This deletes a deploy key from a repository. Example: $ curl -XDELETE \\ -H \"Authorization <auth header>\" \\ https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234
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}`. |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeployKey RepositoriesWorkspaceRepoSlugDeployKeysKeyIdGet(ctx, keyId, repoSlug, workspace) Get a repository deploy key
Returns the deploy key belonging to a specific key. Example: $ curl -H \"Authorization <auth header>\" \\ https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234 Output: { \"comment\": \"mleu@C02W454JHTD8\", \"last_used\": null, \"links\": { \"self\": { \"href\": https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234\" } }, \"repository\": { \"full_name\": \"mleu/test\", \"name\": \"test\", \"type\": \"repository\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"label\": \"mykey\", \"created_on\": \"2018-08-15T23:50:59.993890+00:00\", \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\", \"id\": 1234, \"type\": \"deploy_key\" }
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}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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 -XPUT \\ -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\", }' Output: { \"comment\": \"newcomment\", \"last_used\": null, \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234\" } }, \"repository\": { \"full_name\": \"mleu/test\", \"name\": \"test\", \"type\": \"repository\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"label\": \"newlabel\", \"created_on\": \"2018-08-15T23:50:59.993890+00:00\", \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\", \"id\": 1234, \"type\": \"deploy_key\" }
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}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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 -XPOST \\ -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\" }' Output: { \"id\": 123, \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\", \"label\": \"mydeploykey\", \"type\": \"deploy_key\", \"created_on\": \"2018-08-15T23:50:59.993890+00:00\", \"repository\": { \"full_name\": \"mleu/test\", \"name\": \"test\", \"type\": \"repository\", \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\" }, \"links\":{ \"self\":{ \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123\" } } \"last_used\": null, \"comment\": \"mleu@C02W454JHTD8\" }
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}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateEnvironmentForRepository(ctx, workspace, repoSlug, environmentUuid) Update an environment
Update an environment
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. |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedProjectDeployKeys WorkspacesWorkspaceProjectsProjectKeyDeployKeysGet(ctx, projectKey, workspace, optional) List project deploy keys
Returns all deploy keys belonging to a project. Example: $ curl -H \"Authorization <auth header>\" \\ https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys Output: { \"pagelen\":10, \"values\":[ { \"comment\":\"thakseth@C02W454JHTD8\", \"last_used\":null, \"links\":{ \"self\":{ \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234\" } }, \"label\":\"test\", \"project\":{ \"links\":{ \"self\":{ \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT\" } }, \"type\":\"project\", \"name\":\"cooperative standard\", \"key\":\"TEST_PROJECT\", \"uuid\":\"{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}\" }, \"created_on\":\"2021-07-28T21:20:19.491721+00:00\", \"key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r\", \"type\":\"project_deploy_key\", \"id\":1234 } ], \"page\":1, \"size\":1 }
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 are passed through a pointer to a DeploymentsApiWorkspacesWorkspaceProjectsProjectKeyDeployKeysGetOpts struct
Name | Type | Description | Notes |
---|
page | optional.Int32| page |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdDelete(ctx, keyId, projectKey, workspace) Delete a deploy key from a project
This deletes a deploy key from a project. Example: $ curl -XDELETE \\ -H \"Authorization <auth header>\" \\ https://api.bitbucket.org/2.0/workspaces/jzeng/projects/JZ/deploy-keys/1234
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}`. |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProjectDeployKey WorkspacesWorkspaceProjectsProjectKeyDeployKeysKeyIdGet(ctx, keyId, projectKey, workspace) Get a project deploy key
Returns the deploy key belonging to a specific key ID. Example: $ curl -H \"Authorization <auth header>\" \\ https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234 Output: { \"pagelen\":10, \"values\":[ { \"comment\":\"thakseth@C02W454JHTD8\", \"last_used\":null, \"links\":{ \"self\":{ \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234\" } }, \"label\":\"test\", \"project\":{ \"links\":{ \"self\":{ \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT\" } }, \"type\":\"project\", \"name\":\"cooperative standard\", \"key\":\"TEST_PROJECT\", \"uuid\":\"{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}\" }, \"created_on\":\"2021-07-28T21:20:19.491721+00:00\", \"key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r\", \"type\":\"project_deploy_key\", \"id\":1234 } ], }
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}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProjectDeployKey WorkspacesWorkspaceProjectsProjectKeyDeployKeysPost(ctx, projectKey, workspace) Create a project deploy key
Create a new deploy key in a project. Example: $ curl -XPOST \\ -H \"Authorization <auth header>\" \\ -H \"Content-type: application/json\" \\ https://api.bitbucket.org/2.0/workspaces/jzeng/projects/JZ/deploy-keys/ -d \\ '{ \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8\", \"label\": \"mydeploykey\" }' Output: { \"comment\": \"mleu@C02W454JHTD8\", \"last_used\": null, \"links\": { \"self\": { \"href\": \"https://api.bitbucket.org/2.0/workspaces/testadfsa/projects/ASDF/deploy-keys/5/\" } }, \"label\": \"myprojectkey\", \"project\": { ... }, \"created_on\": \"2021-08-10T05:28:00.570859+00:00\", \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\", \"type\": \"project_deploy_key\", \"id\": 5 }
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}`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]