Rate this page:
Teams are deploying code faster than ever, thanks to continuous delivery practices and tools like Bitbucket Pipelines. Bitbucket Deployments gives teams visibility into their deployment environments and helps teams to track how far changes have progressed in their deployment pipeline.
GET /2.0/repositories/{workspace}/{repo_slug}/deploy-keys
Returns all deploy-keys belonging to a repository.
Example:
1 2$ 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 }
repository
repository:admin
string
This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}
.
string
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}
.
1 2 3 4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/deploy-keys' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'