Users and Roles
List Roles
Returns a list of all roles. Learn more about HarperDB roles here: https://harperdb.io/docs/security/users-roles/.
Operation is restricted to super_user roles only
operation (required) - must always be
list_roles
Body
Response: 200
Add Role
Creates a new role with the specified permissions. Learn more about HarperDB roles here: https://harperdb.io/docs/security/users-roles/.
Operation is restricted to super_user roles only
operation (required) - must always be
add_role
role (required) - name of role you are defining
permission (required) - object defining permissions for users associated with this role:
super_user (optional) - boolean which, if set to true, gives users associated with this role full access to all operations and methods. If not included, value will be assumed to be false.
structure_user (optional) - boolean OR array of schema names (as strings). If boolean, user can create new schemas and tables. If array of strings, users can only manage tables within the specified schemas. This overrides any individual table permissions for specified schemas, or for all schemas if the value is true.
Body
Response: 200
Alter Role
Modifies an existing role with the specified permissions. updates permissions from an existing role. Learn more about HarperDB roles here: https://harperdb.io/docs/security/users-roles/.
Operation is restricted to super_user roles only
operation (required) - must always be
alter_role
id (required) - the id value for the role you are altering
role (optional) - name value to update on the role you are altering
permission (required) - object defining permissions for users associated with this role:
super_user (optional) - boolean which, if set to true, gives users associated with this role full access to all operations and methods. If not included, value will be assumed to be false.
structure_user (optional) - boolean OR array of schema names (as strings). If boolean, user can create new schemas and tables. If array of strings, users can only manage tables within the specified schemas. This overrides any individual table permissions for specified schemas, or for all schemas if the value is true.
Body
Response: 200
Drop Role
Deletes an existing role from the database. NOTE: Role with associated users cannot be dropped. Learn more about HarperDB roles here: https://harperdb.io/docs/security/users-roles/.
Operation is restricted to super_user roles only
operation (required) - this must always be
drop_role
id (required) - this is the id of the role you are dropping
Body
Response: 200
List Users
Returns a list of all users. Learn more about HarperDB users here: https://harperdb.io/docs/security/users-roles/.
Operation is restricted to super_user roles only
operation (required) - must always be
list_users
Body
Response: 200
User Info
Returns user data for the associated user credentials.
operation (required) - must always be
user_info
Body
Response: 200
Add User
Creates a new user with the specified role and credentials. Learn more about HarperDB users here: https://harperdb.io/docs/security/users-roles/.
Operation is restricted to super_user roles only
operation (required) - must always be
add_user
role (required) - 'role' name value of the role you wish to assign to the user. See
add_role
for more detailusername (required) - username assigned to the user. It can not be altered after adding the user. It serves as the hash
password (required) - clear text for password. HarperDB will encrypt the password upon receipt
active (required) - boolean value for status of user's access to your HarperDB instance. If set to false, user will not be able to access your instance of HarperDB.
Body
Response: 200
Alter User
Modifies an existing user's role and/or credentials. Learn more about HarperDB users here: https://harperdb.io/docs/security/users-roles/.
Operation is restricted to super_user roles only
operation (required) - must always be
alter_user
username (required) - username assigned to the user. It can not be altered after adding the user. It serves as the hash.
password (optional) - clear text for password. HarperDB will encrypt the password upon receipt
role (optional) -
role
name value of the role you wish to assign to the user. Seeadd_role
for more detailactive (optional) - status of user's access to your HarperDB instance. See
add_role
for more detail
Body
Response: 200
Drop User
Deletes an existing user by username. Learn more about HarperDB users here: https://harperdb.io/docs/security/users-roles/.
Operation is restricted to super_user roles only
operation (required) - must always be
drop_user
username (required) - username assigned to the user
Body
Response: 200
Last updated