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 name

  • opts (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 user

  • opts (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:
  • name (string()) – The user’s name

  • active (bool()) – The new active state of the user

  • permissions (list()) – The list of permissions of the user

  • groups (list()) – The list of groups of the user

  • opts (object()) – Additional options for the request

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 name

  • opts (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 name

  • password (string()) – The new password

  • oldpw (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 name

  • opts (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 name

  • opts (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 name

  • opts (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 name

  • settings (object()) – The new settings, may be a partial set of settings which will be merged unto the current ones

  • opts (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 ID

  • opts (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.

group is expected to be the new group with at least key and name defined. Further supported parameters are description, permissions, subgroups and the default flag.

Arguments:
  • group (object()) – The new group

  • opts (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 key field in the group. Only description, permissions, subgroups and default flag will be updated.

Arguments:
  • group (object()) – The updated group

  • opts (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 ID

  • opts (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.