Developer
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
  • Authentication
  • Builds and Deployments
  • Capabilities
  • Dashboard
  • Deprecated
  • Jira Integration
  • Markup
  • Mirroring (Mirror)
  • Mirroring (Upstream)
  • Permission Management
  • Project
  • Pull Requests
  • Repository
  • Security
  • Ssh
  • System Maintenance
  • Other operations
Server
Bitbucket Data Center / / Modules

Ssh

Postman Collection
OpenAPI
GET

Get global SSH key settings

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

Forge and OAuth2 apps cannot access this REST resource.

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 { "maxExpiryDays": { "asInt": 2154, "present": true }, "keyTypeRestrictions": [ { "minKeyLength": { "asInt": 2154, "present": true }, "allowed": true, "algorithm": "RSA" } ] }
PUT

Update global SSH key settings

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

Forge and OAuth2 apps cannot access this REST resource.

Request

Request bodyapplication/json

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

maxExpiryDays

object

keyTypeRestrictions

array<RestSshKeyTypeRestriction>

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 '{ "maxExpiryDays": { "asInt": 2154, "present": true }, "keyTypeRestrictions": [ { "minKeyLength": { "asInt": 2154, "present": true }, "allowed": true, "algorithm": "RSA" } ] }'
GET

Get supported SSH key algorithms and lengths

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

Forge and OAuth2 apps cannot access this REST resource.

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: