KyPanelDocs

API reference

SSH

SSH keys of an account.

List SSH keys

GET/api/v1/accounts/{id}/ssh/keys

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: ssh
Feature
ssh_keys
Operation
sshList · ky call sshList

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body

    map of any

  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: not-ready
  • 500 Internal Server Error: internal

Delete an SSH key

DELETE/api/v1/accounts/{id}/ssh/keys/{kid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: ssh
Feature
ssh_keys
Operation
sshDelete · ky call sshDelete

Parameters

NameIn
idpath
kidpath

Responses

  • 204 Done, no content
  • 400 Bad Request: rejected
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: not-ready
  • 500 Internal Server Error: internal

Authorize or deauthorize an SSH key

PUT/api/v1/accounts/{id}/ssh/keys/{kid}/authorization

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: ssh
Feature
ssh_keys
Operation
sshAuthorize · ky call sshAuthorize

Parameters

NameIn
idpath
kidpath

Request body

FieldType
authorizedboolean

Responses

  • 204 Done, no content
  • 400 Bad Request: rejected
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: not-ready
  • 500 Internal Server Error: internal

Generate an SSH key

POST/api/v1/accounts/{id}/ssh/keys/generate

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: ssh
Feature
ssh_keys
Operation
sshGenerate · ky call sshGenerate

Parameters

NameIn
idpath

Request body

FieldType
authorizeboolean
bitsinteger
namestring
passphrasestring
private_keystring
public_keystring
typestring

Responses

  • 201 Created
    Body

    map of any

  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: not-ready, validation
  • 500 Internal Server Error: internal

Import an SSH key

POST/api/v1/accounts/{id}/ssh/keys/import

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: ssh
Feature
ssh_keys
Operation
sshImport · ky call sshImport

Parameters

NameIn
idpath

Request body

FieldType
authorizeboolean
bitsinteger
namestring
passphrasestring
private_keystring
public_keystring
typestring

Responses

  • 201 Created
    Body

    map of any

  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: not-ready, validation
  • 500 Internal Server Error: internal