OctoPrintClient.access¶
Note
Most methods here require that the used API token or the existing browser session has admin rights or corresponds to the user to be modified. Some methods definitely require admin rights.
OctoPrintClient.access.permissions¶
- OctoPrintClient.access.permissions.list(opts)¶
Get a list of all registered permissions.
- Arguments:¶
opts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
See also
- Permissions
The documentation of the underlying permissions API.
OctoPrintClient.access.users¶
- OctoPrintClient.access.users.list(opts)¶
Get a list of all registered users.
Requires admin rights.
- Arguments:¶
opts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.users.get(name, opts)¶
Get information about a specific user.
- Arguments:¶
name (
string()) – The user’s nameopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.users.add(user, opts)¶
Add a new user.
Requires admin rights.
- Arguments:¶
user (
object()) – The new useropts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.users.update(name, active, permissions, groups, opts)¶
Update an existing user.
Requires admin rights.
- Arguments:¶
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.users.delete(name, opts)¶
Delete an existing user.
Requires admin rights.
- Arguments:¶
name (
string()) – The user’s nameopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.users.changePassword(name, password, oldpw, opts)¶
Change the password for a user.
- Arguments:¶
name (
string()) – The user’s namepassword (
string()) – The new passwordoldpw (
string()) – The old password, optional (but required in most cases)opts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.users.generateApiKey(name, opts)¶
Generate a new API key for a user.
- Arguments:¶
name (
string()) – The user’s nameopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.users.resetApiKey(name, opts)¶
Reset the API key for a user to being unset.
- Arguments:¶
name (
string()) – The user’s nameopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.users.getSettings(name, opts)¶
Get the settings for a user.
- Arguments:¶
name (
string()) – The user’s nameopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.users.saveSettings(name, settings, opts)¶
Save the settings for a user.
- Arguments:¶
name (
string()) – The user’s namesettings (
object()) – The new settings, may be a partial set of settings which will be merged unto the current onesopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
See also
- Users
The documentation of the underlying user API.
OctoPrintClient.access.groups¶
- OctoPrintClient.access.groups.list(opts)¶
Get a list of registered groups.
- Arguments:¶
opts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.groups.get(key, opts)¶
Get information about a specific group.
- Arguments:¶
key (
string()) – The group’s IDopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.groups.add(group, opts)¶
Add a new group.
groupis expected to be the new group with at leastkeyandnamedefined. Further supported parameters aredescription,permissions,subgroupsand thedefaultflag.- Arguments:¶
group (
object()) – The new groupopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.groups.update(group, opts)¶
Update an existing group, identified by the
keyfield in thegroup. Onlydescription,permissions,subgroupsanddefaultflag will be updated.- Arguments:¶
group (
object()) – The updated groupopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
- OctoPrintClient.access.groups.delete(key, opts)¶
Delete a group.
- Arguments:¶
key (
string()) – The group’s IDopts (
object()) – Additional options for the request
- Returns Promise:¶
A jQuery Promise for the request’s response
See also
- Groups
The documentation of the underlying groups API.