Server
Bitbucket Data Center / / Modules
GET

Get global SSH key settings

Gets the global settings that enforce the maximum expiry of SSH keys and restrictions on SSH key types.

Request

This request has no parameters.

Responses

The global ssh key settings configuration.

application/json

RestSshKeySettings
GET/admin
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/admin' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "keyTypeRestrictions": [ { "minKeyLength": { "present": true, "asInt": 2154 }, "allowed": true, "algorithm": "RSA" } ], "maxExpiryDays": { "present": true, "asInt": 2154 } }
PUT

Update global SSH key settings

Updates the global settings that enforces the maximum expiry of SSH keys and restrictions on SSH key types.

Request

Request bodyapplication/json

A request containing expiry length to be set for SSH keys and a list of SSH key type restrictions.

keyTypeRestrictions

array<RestSshKeyTypeRestriction>

maxExpiryDays

object

Responses

The ssh key global settings were updated.

PUT/admin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 curl --request PUT \ --url 'http://{baseurl}/rest/admin' \ --header 'Content-Type: application/json' \ --data '{ "keyTypeRestrictions": [ { "minKeyLength": { "present": true, "asInt": 2154 }, "allowed": true, "algorithm": "RSA" } ], "maxExpiryDays": { "present": true, "asInt": 2154 } }'
GET

Get supported SSH key algorithms and lengths

Retrieves a list of all supported SSH key algorithms and lengths.

Request

This request has no parameters.

Responses

A list of supported SSH key algorithms and lengths.

application/json

any

GET/admin/supported-key-types
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/admin/supported-key-types' \ --header 'Accept: application/json'

Rate this page: