GET

Get ssh latest keys

Retrieve a page of ssh keys.

Request

Query parameters

userName

string

user

string

start

number

limit

number

Responses

A page of ssh keys.

application/json

object
GET/ssh/latest/keys
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/ssh/latest/keys' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "values": [ { "algorithmType": "<string>", "bitLength": 2154, "id": 1, "text": "sh-rsa AAAAB3... me@127.0.0.1", "label": "me@127.0.0.1" } ], "size": 1, "isLastPage": true, "nextPageStart": 2154, "start": 2154, "limit": 25 }
POST

Post ssh latest keys

Add a new ssh key to a supplied user.

Request

Query parameters

userName

RestSshKey

user

string

Request bodyapplication/json

algorithmType

string

bitLength

integer

text

string

Responses

The newly created ssh key.

application/json

RestSshKey
POST/ssh/latest/keys
1 2 3 4 5 6 7 8 9 curl --request POST \ --url 'http://{baseurl}/rest/ssh/latest/keys' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "algorithmType": "<string>", "bitLength": 2154, "text": "sh-rsa AAAAB3... me@127.0.0.1" }'
201Response
1 2 3 4 5 6 7 { "algorithmType": "<string>", "bitLength": 2154, "id": 1, "text": "sh-rsa AAAAB3... me@127.0.0.1", "label": "me@127.0.0.1" }
DEL

Delete ssh latest keys

Delete all ssh keys for a supplied user.

Request

Query parameters

userName

string

user

string

Responses

The ssh keys matching the supplied user were deleted.

DEL/ssh/latest/keys
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/ssh/latest/keys'
DEL

Delete ssh latest keys {keyId}

Delete an ssh key.

Request

Path parameters

keyId

string

Required

Responses

The ssh key matching the supplied id was deleted or did not exist.

DEL/ssh/latest/keys/{keyId}
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/ssh/latest/keys/{keyId}'
GET

Get ssh latest projects {projectKey} repos {repositorySlug} ssh

Retrieves the access keys for the repository identified in the URL.

Request

Path parameters

projectKey

string

Required
repositorySlug

string

Required

Query parameters

filter

string

effective

string

minimumPermission

string

permission

string

start

number

limit

number

Responses

A single page of access keys for the repository.

application/json

object
GET/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 { "values": [ { "key": { "algorithmType": "<string>", "bitLength": 2154, "id": 1, "text": "sh-rsa AAAAB3... me@127.0.0.1", "label": "me@127.0.0.1" }, "permission": "USER_ADMIN", "project": { "avatar": "<string>", "name": "My Cool Project", "key": "PRJ", "public": true, "id": 2154, "type": "NORMAL", "description": "The description for my cool project", "namespace": "<string>", "scope": "PROJECT" }, "repository": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "origin": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" }, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" } } ], "size": 1, "isLastPage": true, "nextPageStart": 2154, "start": 2154, "limit": 25 }
POST

Post ssh latest projects {projectKey} repos {repositorySlug} ssh

Register a new SSH key and grants access to the repository identified in the URL.

Request

Path parameters

projectKey

string

Required
repositorySlug

string

Required

Request bodyapplication/json

key

object

permission

string

project

object

repository

object

Responses

The newly created access key

application/json

RestSshAccessKey
POST/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 curl --request POST \ --url 'http://{baseurl}/rest/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "key": { "algorithmType": "<string>", "bitLength": 2154, "text": "sh-rsa AAAAB3... me@127.0.0.1" }, "permission": "USER_ADMIN", "project": { "avatar": "<string>", "avatarUrl": "<string>", "key": "PRJ", "links": {} }, "repository": { "scmId": "git", "slug": "my-repo", "name": "My repo", "project": "PROJ", "links": {} } }'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 { "key": { "algorithmType": "<string>", "bitLength": 2154, "id": 1, "text": "sh-rsa AAAAB3... me@127.0.0.1", "label": "me@127.0.0.1" }, "permission": "USER_ADMIN", "project": { "avatar": "<string>", "name": "My Cool Project", "key": "PRJ", "public": true, "id": 2154, "type": "NORMAL", "description": "The description for my cool project", "namespace": "<string>", "scope": "PROJECT" }, "repository": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "origin": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" }, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" } }
GET

Get ssh latest projects {projectKey} repos {repositorySlug} ssh {keyId}

Retrieves the access key for the SSH key with id keyId on the repository identified in the URL.

Request

Path parameters

projectKey

string

Required
keyId

string

Required
repositorySlug

string

Required

Responses

the access key for the repository and SSH key with ID keyId.

application/json

RestSshAccessKey
GET/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 { "key": { "algorithmType": "<string>", "bitLength": 2154, "id": 1, "text": "sh-rsa AAAAB3... me@127.0.0.1", "label": "me@127.0.0.1" }, "permission": "USER_ADMIN", "project": { "avatar": "<string>", "name": "My Cool Project", "key": "PRJ", "public": true, "id": 2154, "type": "NORMAL", "description": "The description for my cool project", "namespace": "<string>", "scope": "PROJECT" }, "repository": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "origin": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" }, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" } }
DEL

Delete ssh latest projects {projectKey} repos {repositorySlug} ssh {keyId}

Remove an existing access key for the repository identified in the URL. If the same SSH key is used as an access key for multiple projects or repositories, only the access to the repository identified in the URL will be revoked.

Request

Path parameters

projectKey

string

Required
keyId

string

Required
repositorySlug

string

Required

Responses

The access key was deleted (or none was found matching the given id).

DEL/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}'
PUT

Put ssh latest projects {projectKey} repos {repositorySlug} ssh {keyId} permission {permission}

Updates the permission granted to the specified SSH key to the repository identified in the URL.

Request

Path parameters

projectKey

string

Required
keyId

string

Required
permission

string

Required
repositorySlug

string

Required

Responses

The newly created access key

application/json

RestSshAccessKey
PUT/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}/permission/{permission}
1 2 3 curl --request PUT \ --url 'http://{baseurl}/rest/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}/permission/{permission}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 { "key": { "algorithmType": "<string>", "bitLength": 2154, "id": 1, "text": "sh-rsa AAAAB3... me@127.0.0.1", "label": "me@127.0.0.1" }, "permission": "USER_ADMIN", "project": { "avatar": "<string>", "name": "My Cool Project", "key": "PRJ", "public": true, "id": 2154, "type": "NORMAL", "description": "The description for my cool project", "namespace": "<string>", "scope": "PROJECT" }, "repository": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "origin": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" }, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" } }
GET

Get ssh latest projects {projectKey} ssh

Retrieves the access keys for the project identified in the URL.

Request

Path parameters

projectKey

string

Required

Query parameters

filter

string

permission

string

start

number

limit

number

Responses

A single page of access keys associated with the project.

application/json

object
GET/ssh/latest/projects/{projectKey}/ssh
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/ssh/latest/projects/{projectKey}/ssh' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 { "values": [ { "key": { "algorithmType": "<string>", "bitLength": 2154, "id": 1, "text": "sh-rsa AAAAB3... me@127.0.0.1", "label": "me@127.0.0.1" }, "permission": "USER_ADMIN", "project": { "avatar": "<string>", "name": "My Cool Project", "key": "PRJ", "public": true, "id": 2154, "type": "NORMAL", "description": "The description for my cool project", "namespace": "<string>", "scope": "PROJECT" }, "repository": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "origin": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" }, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" } } ], "size": 1, "isLastPage": true, "nextPageStart": 2154, "start": 2154, "limit": 25 }
POST

Post ssh latest projects {projectKey} ssh

Register a new SSH key and grants access to the project identified in the URL.

Request

Path parameters

projectKey

string

Required

Request bodyapplication/json

key

object

permission

string

project

object

repository

object

Responses

The newly created access key

application/json

RestSshAccessKey
POST/ssh/latest/projects/{projectKey}/ssh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 curl --request POST \ --url 'http://{baseurl}/rest/ssh/latest/projects/{projectKey}/ssh' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "key": { "algorithmType": "<string>", "bitLength": 2154, "text": "sh-rsa AAAAB3... me@127.0.0.1" }, "permission": "USER_ADMIN", "project": { "avatar": "<string>", "avatarUrl": "<string>", "key": "PRJ", "links": {} }, "repository": { "scmId": "git", "slug": "my-repo", "name": "My repo", "project": "PROJ", "links": {} } }'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 { "key": { "algorithmType": "<string>", "bitLength": 2154, "id": 1, "text": "sh-rsa AAAAB3... me@127.0.0.1", "label": "me@127.0.0.1" }, "permission": "USER_ADMIN", "project": { "avatar": "<string>", "name": "My Cool Project", "key": "PRJ", "public": true, "id": 2154, "type": "NORMAL", "description": "The description for my cool project", "namespace": "<string>", "scope": "PROJECT" }, "repository": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "origin": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" }, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" } }
GET

Get ssh latest projects {projectKey} ssh {keyId}

Retrieves the access key for the SSH key with id keyId on the repository identified in the URL.

Request

Path parameters

projectKey

string

Required
keyId

string

Required

Responses

the access key for the repository and SSH key with ID keyId.

application/json

RestSshAccessKey
GET/ssh/latest/projects/{projectKey}/ssh/{keyId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/ssh/latest/projects/{projectKey}/ssh/{keyId}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 { "key": { "algorithmType": "<string>", "bitLength": 2154, "id": 1, "text": "sh-rsa AAAAB3... me@127.0.0.1", "label": "me@127.0.0.1" }, "permission": "USER_ADMIN", "project": { "avatar": "<string>", "name": "My Cool Project", "key": "PRJ", "public": true, "id": 2154, "type": "NORMAL", "description": "The description for my cool project", "namespace": "<string>", "scope": "PROJECT" }, "repository": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "origin": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" }, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" } }
DEL

Delete ssh latest projects {projectKey} ssh {keyId}

Remove an existing access key for the project identified in the URL. If the same SSH key is used as an access key for multiple projects or repositories, only the access to the project identified in the URL will be revoked.

Request

Path parameters

projectKey

string

Required
keyId

string

Required

Responses

The access key was deleted (or none was found matching the given id).

DEL/ssh/latest/projects/{projectKey}/ssh/{keyId}
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/ssh/latest/projects/{projectKey}/ssh/{keyId}'
PUT

Put ssh latest projects {projectKey} ssh {keyId} permission {permission}

Updates the permission granted to the specified SSH key to the project identified in the URL.

Request

Path parameters

projectKey

string

Required
keyId

string

Required
permission

string

Required

Responses

The newly created access key

application/json

RestSshAccessKey
PUT/ssh/latest/projects/{projectKey}/ssh/{keyId}/permission/{permission}
1 2 3 curl --request PUT \ --url 'http://{baseurl}/rest/ssh/latest/projects/{projectKey}/ssh/{keyId}/permission/{permission}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 { "key": { "algorithmType": "<string>", "bitLength": 2154, "id": 1, "text": "sh-rsa AAAAB3... me@127.0.0.1", "label": "me@127.0.0.1" }, "permission": "USER_ADMIN", "project": { "avatar": "<string>", "name": "My Cool Project", "key": "PRJ", "public": true, "id": 2154, "type": "NORMAL", "description": "The description for my cool project", "namespace": "<string>", "scope": "PROJECT" }, "repository": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "origin": { "scmId": "git", "hierarchyId": "e3c939f9ef4a7fae272e", "statusMessage": "Available", "partition": 2154, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" }, "archived": true, "forkable": true, "defaultBranch": "main", "relatedLinks": {}, "slug": "my-repo", "name": "My repo", "public": true, "id": 2154, "state": "AVAILABLE", "description": "My repo description", "scope": "REPOSITORY" } }
GET

Get ssh latest settings

Request

This request has no parameters.

Responses

The ssh settings from upstream

application/json

RestSshSettings
GET/ssh/latest/settings
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/ssh/latest/settings' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 { "accessKeysEnabled": true, "fingerprint": { "algorithm": "<string>", "value": "<string>" }, "port": 7999, "enabled": true, "baseUrl": "ssh://example.com" }
DEL

Delete ssh latest ssh {keyId}

Remove an existing access key for the projects and repositories in the submitted entity. If the same SSH key is used as an access key for multiple projects or repositories not supplied, only the access to the projects or repositories identified will be revoked.

Request

Path parameters

keyId

string

Required

Request bodyapplication/json

projects

RestProject

repositories

RestRepository

Responses

The access keys were deleted (or none was found matching the given id and repositories or projects

DEL/ssh/latest/ssh/{keyId}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 curl --request DELETE \ --url 'http://{baseurl}/rest/ssh/latest/ssh/{keyId}' \ --header 'Content-Type: application/json' \ --data '{ "projects": { "avatar": "<string>", "avatarUrl": "<string>", "key": "PRJ", "links": {} }, "repositories": { "scmId": "git", "slug": "my-repo", "name": "My repo", "project": "PROJ", "links": {} } }'
GET

Get ssh latest ssh {keyId} projects

Retrieves all project-related access keys for the SSH key with id keyId. If the current user is not an admin any of the projects the key provides access to, none are returned.

Request

Path parameters

keyId

integer

Required

Responses

the SSH key with ID keyId.

application/json

any

GET/ssh/latest/ssh/{keyId}/projects
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/ssh/latest/ssh/{keyId}/projects' \ --header 'Accept: application/json'
GET

Get ssh latest ssh {keyId} repos

Retrieves all repository-related access keys for the SSH key with id keyId. If the current user is not an admin of any of the projects the key provides access to, none are returned.

Request

Path parameters

keyId

string

Required

Responses

the SSH key with ID keyId.

application/json

any

GET/ssh/latest/ssh/{keyId}/repos
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/ssh/latest/ssh/{keyId}/repos' \ --header 'Accept: application/json'

Rate this page: