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.The display name for the SSH public key (maximum 50 characters).
The SSH public key string to register.
The SSH public key was successfully registered.
Unauthorized
Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED
Error code
Error message
Forbidden
Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED
Error code
Error message
Unprocessable Content
Possible error codes: ERR_INVALID_PARAMETER, ERR_SSH_PUBLIC_KEY_EXISTS
Error code
Error message
Request blocked by WAF
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"
}'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())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.The display name for the SSH public key (maximum 50 characters).
Optional passphrase to protect the generated private key.
The SSH key pair was successfully generated.
Generated SSH private key.
Generated SSH public key.
Unauthorized
Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED
Error code
Error message
Forbidden
Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED
Error code
Error message
Unprocessable Content
Possible error codes: ERR_INVALID_PARAMETER, ERR_SSH_PUBLIC_KEY_EXISTS
Error code
Error message
Request blocked by WAF
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"
}'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())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.The unique identifier of the entity.
The SSH public key was successfully deleted.
Unauthorized
Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED
Error code
Error message
Forbidden
Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DELETED, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED
Error code
Error message
Request blocked by WAF
curl -X DELETE \
"https://{instance}.kiteworks.com/rest/userSshPublicKeys/:id" \
-H "Authorization: Bearer YOUR_TOKEN"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())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.Maximum number of SSH public keys to return.
The list of SSH public keys has been successfully returned.
Unique identifier of the SSH public key.
SSH public key string.
Display name for the SSH public key.
Indicates whether the SSH public key is active and can be used for authentication.
Indicates whether an administrator has enabled this SSH public key.
Unauthorized
Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED
Error code
Error message
Forbidden
Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED
Error code
Error message
Request blocked by WAF
curl -X GET \
"https://{instance}.kiteworks.com/rest/userSshPublicKeys" \
-H "Authorization: Bearer YOUR_TOKEN"import requests
url = "https://{instance}.kiteworks.com/rest/userSshPublicKeys"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())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.The unique identifier (UUID) of the entity.
The list of SSH public keys was returned successfully.
Unique identifier of the SSH public key.
SSH public key string.
Display name for the SSH public key.
Indicates whether the SSH public key is active and can be used for authentication.
Indicates whether an administrator has enabled this SSH public key.
Indicates whether the SSH public key has been deleted.
Unauthorized
Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED
Error code
Error message
Forbidden
Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED
Error code
Error message
Request blocked by WAF
curl -X GET \
"https://{instance}.kiteworks.com/rest/admin/users/:id/userSshPublicKeys" \
-H "Authorization: Bearer YOUR_TOKEN"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())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.The unique identifier (UUID) of the entity.
The display name for the SSH public key (maximum 50 characters).
The SSH public key string to register.
The SSH public key record was created successfully.
Unauthorized
Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED
Error code
Error message
Forbidden
Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED
Error code
Error message
Unprocessable Content
Possible error codes: ERR_INVALID_PARAMETER, ERR_SSH_PUBLIC_KEY_EXISTS
Error code
Error message
Request blocked by WAF
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"
}'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())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.The unique identifier (UUID) of the entity.
The display name for the SSH public key (maximum 50 characters).
Optional passphrase to protect the generated private key.
The SSH key pair was generated successfully.
Generated SSH private key.
Generated SSH public key.
Unauthorized
Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED
Error code
Error message
Forbidden
Possible error codes: ERR_ACCESS_USER, ERR_PROFILE_SFTP_DISABLED, ERR_SYSTEM_ROLE_SFTP_DISABLED
Error code
Error message
Unprocessable Content
Possible error codes: ERR_INVALID_PARAMETER, ERR_SSH_PUBLIC_KEY_EXISTS
Error code
Error message
Request blocked by WAF
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"
}'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())