userSshPublicKeys

7 endpoints
POST/rest/userSshPublicKeys/create

Register an SSH public key for the current user

Description:

Registers an existing SSH public key for the current user.

Precondition:

SFTP access must be enabled for the user's profile and role.

Response:

The SSH public key is registered.
Request Body
name
Required
string

The display name for the SSH public key (maximum 50 characters).

publicKey
Required
string

The SSH public key string to register.


Responses

The SSH public key was successfully registered.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER, ERR_SSH_PUBLIC_KEY_EXISTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/userSshPublicKeys/create" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "name": "string",
         "publicKey": "string"
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/userSshPublicKeys/create"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "name": "string",
  "publicKey": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_PROFILE_SFTP_DISABLED", "message": "SFTP is not enabled for this profile" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_ROLE_SFTP_DISABLED", "message": "SFTP role is not enabled on server" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SSH_PUBLIC_KEY_EXISTS", "message": "Same ssh public key name exists" } ] }
// Error - No Body
POST/rest/userSshPublicKeys/generate

Generate a new SSH public/private key pair

Description:

Generates a new SSH public/private key pair for the current user and registers the public key.

Precondition:

SFTP access must be enabled for the user's profile and role.

Response:

The generated SSH public/private key pair is returned.
Request Body
name
Required
string

The display name for the SSH public key (maximum 50 characters).

passphrase
string

Optional passphrase to protect the generated private key.


Responses

The SSH key pair was successfully generated.

privateKey
string

Generated SSH private key.

publicKey
string

Generated SSH public key.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER, ERR_SSH_PUBLIC_KEY_EXISTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/userSshPublicKeys/generate" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "name": "string",
         "passphrase": "string"
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/userSshPublicKeys/generate"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "name": "string",
  "passphrase": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "privateKey": "string", "publicKey": "string" }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_PROFILE_SFTP_DISABLED", "message": "SFTP is not enabled for this profile" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_ROLE_SFTP_DISABLED", "message": "SFTP role is not enabled on server" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SSH_PUBLIC_KEY_EXISTS", "message": "Same ssh public key name exists" } ] }
// Error - No Body
DELETE/rest/userSshPublicKeys/{id}

Delete an SSH public key

Description:

Deletes the specified SSH public key belonging to the current user.

Precondition:

SFTP access must be enabled for the user's profile and role.

Response:

The SSH public key is deleted.
Parameters
Path Parameters
id
Required
integer

The unique identifier of the entity.


Responses

The SSH public key was successfully deleted.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DELETED, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X DELETE \
  "https://{instance}.kiteworks.com/rest/userSshPublicKeys/:id" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/userSshPublicKeys/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DELETED", "message": "Entity is deleted" } ] }
{ "errors": [ { "code": "ERR_PROFILE_SFTP_DISABLED", "message": "SFTP is not enabled for this profile" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_ROLE_SFTP_DISABLED", "message": "SFTP role is not enabled on server" } ] }
// Error - No Body
GET/rest/userSshPublicKeys

List the current user's SSH public keys

Description:

Returns the list of SSH public keys registered for the current user.

Precondition:

SFTP access must be enabled for the user's profile and role.

Response:

A list of SSH public key records is returned.
Parameters
Query Parameters
limit
Optional
integer

Maximum number of SSH public keys to return.


Responses

The list of SSH public keys has been successfully returned.

id
integer

Unique identifier of the SSH public key.

userId
string
publicKey
string

SSH public key string.

name
string

Display name for the SSH public key.

active
boolean

Indicates whether the SSH public key is active and can be used for authentication.

adminActive
boolean

Indicates whether an administrator has enabled this SSH public key.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/userSshPublicKeys" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/userSshPublicKeys"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": 1, "userId": "string", "publicKey": "string", "name": "string", "active": true, "adminActive": true } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_PROFILE_SFTP_DISABLED", "message": "SFTP is not enabled for this profile" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_ROLE_SFTP_DISABLED", "message": "SFTP role is not enabled on server" } ] }
// Error - No Body
GET/rest/admin/users/{id}/userSshPublicKeys

List SSH public keys for a user

Description:

Returns all SSH public keys associated with the specified user.

Precondition:

The user must be an administrator. SFTP must be enabled for the user's profile and system role.

Response:

A list of SSH public keys for the specified user is returned.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.


Responses

The list of SSH public keys was returned successfully.

id
integer

Unique identifier of the SSH public key.

userId
string
publicKey
string

SSH public key string.

name
string

Display name for the SSH public key.

active
boolean

Indicates whether the SSH public key is active and can be used for authentication.

adminActive
boolean

Indicates whether an administrator has enabled this SSH public key.

deleted
boolean

Indicates whether the SSH public key has been deleted.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/admin/users/:id/userSshPublicKeys" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/admin/users/{id}/userSshPublicKeys"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": 1, "userId": "string", "publicKey": "string", "name": "string", "active": true, "adminActive": true } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_PROFILE_SFTP_DISABLED", "message": "SFTP is not enabled for this profile" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_ROLE_SFTP_DISABLED", "message": "SFTP role is not enabled on server" } ] }
// Error - No Body
POST/rest/admin/users/{id}/userSshPublicKeys/create

Create an SSH public key for a user

Description:

Creates a new SSH public key record for the specified user using a provided public key string.

Precondition:

The user must be an administrator. SFTP must be enabled for the user's profile and system role.

Response:

The SSH public key record is created successfully.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.


Request Body
name
Required
string

The display name for the SSH public key (maximum 50 characters).

publicKey
Required
string

The SSH public key string to register.


Responses

The SSH public key record was created successfully.

Empty response body.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER, ERR_SSH_PUBLIC_KEY_EXISTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/admin/users/:id/userSshPublicKeys/create" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "name": "string",
         "publicKey": "string"
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/admin/users/{id}/userSshPublicKeys/create"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "name": "string",
  "publicKey": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
// Request successful - No Body
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_PROFILE_SFTP_DISABLED", "message": "SFTP is not enabled for this profile" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_ROLE_SFTP_DISABLED", "message": "SFTP role is not enabled on server" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SSH_PUBLIC_KEY_EXISTS", "message": "Same ssh public key name exists" } ] }
// Error - No Body
POST/rest/admin/users/{id}/userSshPublicKeys/generate

Generate an SSH key pair for a user

Description:

Generates a new SSH public/private key pair for the specified user and stores the public key.

Precondition:

The user must be an administrator. SFTP must be enabled for the user's profile and system role.

Response:

The newly generated public/private key pair is returned.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.


Request Body
name
Required
string

The display name for the SSH public key (maximum 50 characters).

passphrase
string

Optional passphrase to protect the generated private key.


Responses

The SSH key pair was generated successfully.

privateKey
string

Generated SSH private key.

publicKey
string

Generated SSH public key.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER, ERR_SSH_PUBLIC_KEY_EXISTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/admin/users/:id/userSshPublicKeys/generate" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "name": "string",
         "passphrase": "string"
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/admin/users/{id}/userSshPublicKeys/generate"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "name": "string",
  "passphrase": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "privateKey": "string", "publicKey": "string" }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_PROFILE_SFTP_DISABLED", "message": "SFTP is not enabled for this profile" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_ROLE_SFTP_DISABLED", "message": "SFTP role is not enabled on server" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SSH_PUBLIC_KEY_EXISTS", "message": "Same ssh public key name exists" } ] }
// Error - No Body