Add a repository deploy key
Changed onCreate 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"
}'
Request
- Base URLhttps://api.bitbucket.org/2.0
- URLhttps://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/deploy-keys
- Auth
- OAuth 2Authorization code: https://bitbucket.org/site/oauth2/authorizeToken URL: https://bitbucket.org/site/oauth2/access_token scopes: repository, repository:admin
- or HTTP basic
- or API key in header Authorization
Response
The deploy key that was created
Changes
- warning
removed the optional property
///from the response with the status - warning
removed the optional property
///////////////from the response with the status - warning
removed the optional property
////////////from the response with the status - warning
removed the optional property
/////from the response with the status - warning
removed the optional property
///////////from the response with the status - warning
added the new
rebase_fast_forwardenum value to the//////response property for the response status - warning
added the new
rebase_mergeenum value to the//////response property for the response status - warning
added the new
squash_fast_forwardenum value to the//////response property for the response status - info
added the optional property
///////////to the response with the status
- warning