@node-red/runtime.settings

generateUserKey(opts) → {Promise.<String>}

Generates a new ssh key pair

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

name User

the id of the key to return

password User

(optional) the password for the key pair

comment User

(option) a comment to associate with the key pair

size User

(optional) the size of the key. Default: 2048

Returns:
Type:
Promise.<String>
  • the id of the generated key

getRuntimeSettings(opts) → {Promise.<Object>}

Gets the runtime settings object

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

Returns:
Type:
Promise.<Object>
  • the runtime settings

getUserKey(opts) → {Promise.<String>}

Gets a user's ssh public key

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

id User

the id of the key to return

Returns:
Type:
Promise.<String>
  • the user's ssh public key

getUserKeys(opts) → {Promise.<Object>}

Gets a list of a user's ssh keys

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

Returns:
Type:
Promise.<Object>
  • the user's ssh keys

getUserSettings(opts) → {Promise.<Object>}

Gets an individual user's settings object

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

Returns:
Type:
Promise.<Object>
  • the user settings

removeUserKey(opts) → {Promise}

Deletes a user's ssh key pair

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

id User

the id of the key to delete

Returns:
Type:
Promise
  • resolves when deleted

updateUserSettings(opts) → {Promise.<Object>}

Updates an individual user's settings object.

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

settings Object

the updates to the user settings

Returns:
Type:
Promise.<Object>
  • the user settings