Skip to content

Get a project deploy key

GET
/workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}

Returns the deploy key belonging to a specific key ID.

key_id
required
string

The key ID matching the project deploy key.

project_key
required
string

The project in question. This is the actual key assigned to the project.

workspace
required
string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Project deploy key matching the key ID

Media type application/json
object
type
required
string
key

The deploy key value.

string
project
object
type
required
string
links
object
html
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
uuid

The project’s immutable id.

string
key

The project’s key.

string
owner
object
type
required
string
links
Account Links

Links related to an Account.

object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
key
additional properties
any
created_on
string format: date-time
display_name
string
uuid
string
links
object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
self
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
html
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
members
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
projects
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
repositories
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
name

The name of the project.

string
description
string
is_private

Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.

boolean
created_on
string format: date-time
updated_on
string format: date-time
has_publicly_visible_repos

Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.

boolean
comment

The comment parsed from the deploy key (if present)

string
label

The user-defined label for the deploy key

string
added_on
string format: date-time
last_used
string format: date-time
links
object
self
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
created_by
object
type
required
string
links
Account Links

Links related to an Account.

object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
key
additional properties
any
created_on
string format: date-time
display_name
string
uuid
string
Examples
Example response
{
"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
}
]
}

If the specified workspace or project is not accessible to the current user

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}

If the specified workspace or project does not exist

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}