This module makes it slightly easier to interact with the PaperCut NG/MF XML Web Services API via your node.js application, and performs minimal validation of parameters for your API calls.
const PaperCut = require('node-papercut');
const papercut = new PaperCut('my.server.address', 9192, 'my_auth_token');
papercut.getTotalUsers().then(n => console.log(`There are ${n} users`));
I've found that the online docs are often a bit outdated. The list of API methods below is more comprehensive and is based on the auto-generated ServerCommandProxy file included with PaperCut NG/MF. It's best to refer to this page for available methods.
The web API includes several overloaded methods (eg. adjustUserAccountBalance which may take four or five parameters) that are tricky to handle dynamically. Subsequent/variant methods of the same name are assigned a numeric suffix in this module, so you'll end up with:
papercut.adjustUserAccountBalance(username, adjustment, comment);
papercut.adjustUserAccountBalance_2(username, adjustment, comment, accountName);
therefore, again, it's best to refer to this page to see available methods.
This module takes the dubious approach of scraping the HTML docs included with PaperCut NG/MF, then dynamically generating its own methods and docs based on the result. You can use this module without worrying about that, but this module may fall behind as new versions of PaperCut come out.
As a shortcut, you can use PaperCut.call_api(method, param[, ...]) to call an arbitrary API method without having to rebuild this module's data.
If you want to rebuild this module's list of methods, copy the file server/examples/webservices/java/docs/api/ServerCommandProxy.html from your PaperCut NG/MF application server into the root of this module and run the following commands:
npm run scrape
npm run docs
Occasionally, the format of ServerCommandProxy.html will change, and alterations will need to be made to scrape-api-docs.js to accommodate. Typically when this happens, the generated docs will show no methods.
I'd recommend working on a new branch in your own fork of the repo before running the above commands or making changes. If your update is successful and brings this module up to date with the latest version of PaperCut MF, a pull request would then be welcome. (If you're using PaperCut NG, remind me to verify that I won't lose any MF features by merging your branch. I haven't checked whether the same ServerCommandProxy.html file ships with both versions.)
An interface to the PaperCut XML web services API
Kind: global class
- PaperCut
- new PaperCut(host, port, token, path, tls)
- .call_api(method, ...param) ⇒
Promise
- .addAdminAccessGroup(groupName) ⇒
Promise
- .addAdminAccessUser(userName) ⇒
Promise
- .addNewGroup(groupName) ⇒
Promise
- .addNewInternalUser(username, password, fullName, email, cardId, pin) ⇒
Promise
- .addNewSharedAccount(sharedAccountName) ⇒
Promise
- .addNewUser(username) ⇒
Promise
- .addNewUsers() ⇒
Promise
- .addPrinterAccessGroup(serverName, printerName, groupName) ⇒
Promise
- .addPrinterGroup(serverName, printerName, printerGroupName) ⇒
Promise
- .addSharedAccountAccessGroup(sharedAccountName, groupName) ⇒
Promise
- .addSharedAccountAccessUser(sharedAccountName, userName) ⇒
Promise
- .addUserToGroup(userName, groupName) ⇒
Promise
- .adjustSharedAccountAccountBalance(accountName, adjustment, comment) ⇒
Promise
- .adjustUserAccountBalance(username, adjustment, comment) ⇒
Promise
- .adjustUserAccountBalance_2(username, adjustment, comment, accountName) ⇒
Promise
- .adjustUserAccountBalanceByCardNumber(cardNumber, adjustment, comment) ⇒
Promise
- .adjustUserAccountBalanceByCardNumber_2(cardNumber, adjustment, comment, accountName) ⇒
Promise
- .adjustUserAccountBalanceByGroup(group, adjustment, comment) ⇒
Promise
- .adjustUserAccountBalanceByGroup_2(group, adjustment, comment, accountName) ⇒
Promise
- .adjustUserAccountBalanceByGroupUpTo(group, adjustment, limit, comment) ⇒
Promise
- .adjustUserAccountBalanceByGroupUpTo_2(group, adjustment, limit, comment, accountName) ⇒
Promise
- .adjustUserAccountBalanceIfAvailable(username, adjustment, comment) ⇒
Promise
- .adjustUserAccountBalanceIfAvailable_2(username, adjustment, comment, accountName) ⇒
Promise
- .adjustUserAccountBalanceIfAvailableLeaveRemaining(username, adjustment, leaveRemaining, comment) ⇒
Promise
- .adjustUserAccountBalanceIfAvailableLeaveRemaining_2(username, adjustment, leaveRemaining, comment, accountName) ⇒
Promise
- .applyDeviceSettings(deviceName) ⇒
Promise
- .batchImportInternalUsers(importFile, overwriteExistingPasswords, overwriteExistingPINs) ⇒
Promise
- .batchImportPrinters(importFile) ⇒
Promise
- .batchImportSharedAccounts(importFile, test, deleteNonExistentAccounts) ⇒
Promise
- .batchImportUserCardIdNumbers(importFile, overwriteExistingPINs) ⇒
Promise
- .batchImportUsers(importFile, createNewUsers) ⇒
Promise
- .changeInternalAdminPassword(newPassword) ⇒
Promise
- .clearUserAdvancedPrinterSettings(userName) ⇒
Promise
- .createUserClientAccountsFile() ⇒
Promise
- .deleteExistingSharedAccount(sharedAccountName) ⇒
Promise
- .deleteExistingUser(username) ⇒
Promise
- .deleteExistingUser_2(username, redactUserData) ⇒
Promise
- .deletePrinter(serverName, printerName) ⇒
Promise
- .disableDeviceSnmpv3(deviceName) ⇒
Promise
- .disablePrinter(serverName, printerName, disableMins) ⇒
Promise
- .disablePrinterSnmpv3(serverName, printerName) ⇒
Promise
- .disablePrintingForUser(userName, disableMins) ⇒
Promise
- .disableSharedAccount(sharedAccountName, disableMins) ⇒
Promise
- .enableDeviceSnmpv3(deviceName, context, username, authPass, privPass, authProto, privProto) ⇒
Promise
- .enablePrinter(serverName, printerName) ⇒
Promise
- .enablePrinterSnmpv3(serverName, printerName, context, username, authPass, privPass, authProto, privProto) ⇒
Promise
- .exportUserDataHistory(username, saveLocation) ⇒
Promise
- .generateAdHocReport(reportType, dataParams, exportTypeExt, reportTitle, saveLocation) ⇒
Promise
- .generateScheduledReport(reportTitle, saveLocation) ⇒
Promise
- .getConfigValue(configName) ⇒
Promise
- .getDeviceSnmpv3(deviceName) ⇒
Promise
- .getGroupMembers(groupName, offset, limit) ⇒
Promise
- .getGroupQuota(groupName) ⇒
Promise
- .getPrinterCostSimple(serverName, printerName) ⇒
Promise
- .getPrinterProperties(authToken, serverName, printerName, propertyNames) ⇒
Promise
- .getPrinterProperty(serverName, printerName, propertyName) ⇒
Promise
- .getPrinterSnmpv3(serverName, printerName) ⇒
Promise
- .getSharedAccountAccountBalance(accountName) ⇒
Promise
- .getSharedAccountOverdraftMode(accountName) ⇒
Promise
- .getSharedAccountProperties(sharedAccountName, propertyNames) ⇒
Promise
- .getSharedAccountProperty(sharedAccountName, propertyName) ⇒
Promise
- .getTaskStatus() ⇒
Promise
- .getTotalUsers() ⇒
Promise
- .getUserAccountBalance(username) ⇒
Promise
- .getUserAccountBalance_2(username, accountName) ⇒
Promise
- .getUserGroups(userName) ⇒
Promise
- .getUserOverdraftMode(username) ⇒
Promise
- .getUserProperties(userName, propertyNames) ⇒
Promise
- .getUserProperty(userName, propertyName) ⇒
Promise
- .installLicense(licenseFile) ⇒
Promise
- .isGroupExists(groupName) ⇒
Promise
- .isSharedAccountExists(accountName) ⇒
Promise
- .isUserExists(username) ⇒
Promise
- .listPrinters(offset, limit) ⇒
Promise
- .listSharedAccounts(offset, limit) ⇒
Promise
- .listUserAccounts(offset, limit) ⇒
Promise
- .listUserGroups(offset, limit) ⇒
Promise
- .listUserSharedAccounts(userName, offset, limit) ⇒
Promise
- .listUserSharedAccounts_2(userName, offset, limit, ignoreAccountMode) ⇒
Promise
- .lookUpUserNameByCardNo(cardNo) ⇒
Promise
- .lookUpUserNameByEmail(email) ⇒
Promise
- .lookUpUserNameByIDNo(idNo) ⇒
Promise
- .lookUpUserNameBySecondaryUserName(secondaryUserName) ⇒
Promise
- .lookUpUsersByFullName(fullName) ⇒
Promise
- .performGroupSync() ⇒
Promise
- .performOnlineBackup() ⇒
Promise
- .performUserAndGroupSync() ⇒
Promise
- .performUserAndGroupSyncAdvanced(deleteNonExistentUsers, updateUserDetails) ⇒
Promise
- .processJob(jobDetails) ⇒
Promise
- .reapplyInitialUserSettings(username) ⇒
Promise
- .removeAdminAccessGroup(groupName) ⇒
Promise
- .removeAdminAccessUser(userName) ⇒
Promise
- .removeGroup(groupName) ⇒
Promise
- .removePrinterAccessGroup(serverName, printerName, groupName) ⇒
Promise
- .removeSharedAccountAccessGroup(sharedAccountName, groupName) ⇒
Promise
- .removeSharedAccountAccessUser(sharedAccountName, userName) ⇒
Promise
- .removeUserFromGroup(userName, groupName) ⇒
Promise
- .renamePrinter(serverName, printerName, newServerName, newPrinterName) ⇒
Promise
- .renameSharedAccount(currentSharedAccountName, newSharedAccountName) ⇒
Promise
- .renameUserAccount(currentUserName, newUserName) ⇒
Promise
- .resetPrinterCounts(serverName, printerName, resetBy) ⇒
Promise
- .resetUserCounts(username, resetBy) ⇒
Promise
- .runCommand(commandName, args) ⇒
Promise
- .saveThreadSnapshot() ⇒
Promise
- .setConfigValue(configName, configValue) ⇒
Promise
- .setGroupQuota(groupName, quotaAmount, period, quotaMaxAccumulation) ⇒
Promise
- .setPrinterCostSimple(serverName, printerName, costPerPage) ⇒
Promise
- .setPrinterGroups(serverName, printerName, printerGroupNames) ⇒
Promise
- .setPrinterProperties(authToken, serverName, printerName, propertyNamesAndValues) ⇒
Promise
- .setPrinterProperty(serverName, printerName, propertyName, propertyValue) ⇒
Promise
- .setSharedAccountAccountBalance(accountName, balance, comment) ⇒
Promise
- .setSharedAccountOverdraftMode(accountName, mode) ⇒
Promise
- .setSharedAccountProperties(sharedAccountName, propertyNamesAndValues) ⇒
Promise
- .setSharedAccountProperty(sharedAccountName, propertyName, propertyValue) ⇒
Promise
- .setUserAccountBalance(username, balance, comment) ⇒
Promise
- .setUserAccountBalance_2(username, balance, comment, accountName) ⇒
Promise
- .setUserAccountBalanceByGroup(group, balance, comment) ⇒
Promise
- .setUserAccountBalanceByGroup_2(group, balance, comment, accountName) ⇒
Promise
- .setUserAccountSelectionAdvancedPopup(username, allowPersonal, chargeToPersonalWhenSharedSelected, defaultSharedAccount) ⇒
Promise
- .setUserAccountSelectionAutoChargePersonal(username, withPopupConfirmation) ⇒
Promise
- .setUserAccountSelectionAutoSelectSharedAccount(username, accountName, chargeToPersonal) ⇒
Promise
- .setUserAccountSelectionStandardPopup(username, allowPersonal, allowListSelection, allowPinCode, allowPrintingAsOtherUser, chargeToPersonalWhenSharedSelected, defaultSharedAccount) ⇒
Promise
- .setUserOverdraftMode(username, mode) ⇒
Promise
- .setUserProperties(userName, propertyNamesAndValues) ⇒
Promise
- .setUserProperty(userName, propertyName, propertyValue) ⇒
Promise
- .syncGroup(groupName) ⇒
Promise
- .useCard(userName, cardNumber) ⇒
Promise
Create an instance
Param | Type | Default | Description |
---|---|---|---|
host | string |
The PaperCut server's FQDN | |
port | number |
Connect to this port number | |
token | string |
Your API token | |
path | string |
"/rpc/api/xmlrpc" |
The path to the XML web service |
tls | boolean |
true |
Use SSL/TLS |
Call an arbitrary method on the API
Kind: instance method of PaperCut
Returns: Promise
- Resolves with API response or rejects with error
Param | Type | Description |
---|---|---|
method | string |
Method name, eg. 'getUserAccountBalance' |
...param | string | number | boolean |
Parameter(s) for the method call |
Adds a group as an admin group with the default admin rights.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
groupName | string |
Adds a user as administrator with the default admin rights.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
userName | string |
Add a new group to system's group list.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
groupName | string |
Creates and sets up a new internal user account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
password | string |
fullName | string |
string |
|
cardId | string |
pin | string |
Create a new shared account with the given name.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
Trigger the process of adding a new user account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
Calling this method will start a specialized user and group synchronization process optimized for tracking down adding any new users that exist in the OS/Network/Domain user directory and not in the system.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Adds the group to the printer access group list.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
groupName | string |
Add a printer to a single printer group.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
printerGroupName | string |
Allow the given group access to the given shared account without using a pin.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
groupName | string |
Allow the given user access to the given shared account without using a pin.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
userName | string |
Adds the user to the specified group.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
userName | string |
groupName | string |
Adjust a shared account's account balance by an adjustment amount.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
accountName | string |
adjustment | double |
comment | string |
Adjust a user's built-in/default account balance by an adjustment amount.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
adjustment | double |
comment | string |
Adjust a user's account balance by an adjustment amount.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
adjustment | double |
comment | string |
accountName | string |
Adjust a user's account balance.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
cardNumber | string |
adjustment | double |
comment | string |
paperCut.adjustUserAccountBalanceByCardNumber_2(cardNumber, adjustment, comment, accountName) ⇒ Promise
Adjust a user's account balance.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
cardNumber | string |
adjustment | double |
comment | string |
accountName | string |
Adjust the account balance of all users in a group by an adjustment amount.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
group | string |
adjustment | double |
comment | string |
Adjust the account balance of all users in a group by an adjustment amount.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
group | string |
adjustment | double |
comment | string |
accountName | string |
Adjust the account balance of all users in a group by an adjustment amount.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
group | string |
adjustment | double |
limit | double |
comment | string |
paperCut.adjustUserAccountBalanceByGroupUpTo_2(group, adjustment, limit, comment, accountName) ⇒ Promise
Adjust the account balance of all users in a group by an adjustment amount.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
group | string |
adjustment | double |
limit | double |
comment | string |
accountName | string |
Adjust a user's account balance by an adjustment amount (if there is credit available).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
username | string |
adjustment | double |
comment | string |
paperCut.adjustUserAccountBalanceIfAvailable_2(username, adjustment, comment, accountName) ⇒ Promise
Adjust a user's account balance by an adjustment amount (if there is credit available).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
username | string |
adjustment | double |
comment | string |
accountName | string |
paperCut.adjustUserAccountBalanceIfAvailableLeaveRemaining(username, adjustment, leaveRemaining, comment) ⇒ Promise
Adjust a user's account balance by an adjustment amount (if there is credit available to leave the specified amount still available in the account).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
username | string |
adjustment | double |
leaveRemaining | double |
comment | string |
paperCut.adjustUserAccountBalanceIfAvailableLeaveRemaining_2(username, adjustment, leaveRemaining, comment, accountName) ⇒ Promise
Adjust a user's account balance by an adjustment amount (if there is credit available to leave the specified amount still available in the account).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
username | string |
adjustment | double |
leaveRemaining | double |
comment | string |
accountName | string |
Initiates an update to the device of any outstanding configuration changes applied via the set-printer-property or set-printer-properties commands
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
deviceName | string |
paperCut.batchImportInternalUsers(importFile, overwriteExistingPasswords, overwriteExistingPINs) ⇒ Promise
Import the internal users contained in the given tab-delimited import file.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
importFile | string |
overwriteExistingPasswords | boolean |
overwriteExistingPINs | boolean |
Updates printers based on the details contained in the given tab-delimited import file, creating them if required.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
importFile | string |
Import the shared accounts contained in the given tab-delimited import file.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
importFile | string |
test | boolean |
deleteNonExistentAccounts | boolean |
Import the user card/ID numbers and PINs contained in the given tab-delimited import file.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
importFile | string |
overwriteExistingPINs | boolean |
Import the user details contained in the given tab-delimited import file.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
importFile | string |
createNewUsers | boolean |
Change the internal admin password.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
newPassword | string |
Clear the User's Advanced Printer Settings, settings cleared are: dont-hold-jobs-in-release-station, dont-apply-printer-filter-rules, printer-cost-adjustment-rate-percent, dont-archive, auto-release-jobs
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
userName | string |
Requests that the server create the client accounts to a file.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Delete a shared account from the system.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
Delete/remove an existing user from the user list.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
Delete/remove an existing user from the user list.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
redactUserData | boolean |
Delete a printer.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
Disable use of SNMPv3 on the device
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
deviceName | string |
Disable a printer for select period of time.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
disableMins | int |
Disable use of SNMPv3 on the printer
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
Disable printing for a user.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
userName | string |
disableMins | int |
Disable shared account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
disableMins | int |
paperCut.enableDeviceSnmpv3(deviceName, context, username, authPass, privPass, authProto, privProto) ⇒ Promise
Set the SNMPv3 device config details
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
deviceName | string |
context | string |
username | string |
authPass | string |
privPass | string |
authProto | string |
privProto | string |
Enable a printer.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
paperCut.enablePrinterSnmpv3(serverName, printerName, context, username, authPass, privPass, authProto, privProto) ⇒ Promise
Set the SNMPv3 printer config details
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
context | string |
username | string |
authPass | string |
privPass | string |
authProto | string |
privProto | string |
Export user data based on a set of predefined CSV reports (The owner of these files will be the system account running the PaperCut process).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
saveLocation | string |
paperCut.generateAdHocReport(reportType, dataParams, exportTypeExt, reportTitle, saveLocation) ⇒ Promise
Generates an AdHoc report
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
reportType | string |
dataParams | string |
exportTypeExt | string |
reportTitle | string |
saveLocation | string |
Generate a specified scheduled report
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
reportTitle | string |
saveLocation | string |
Get the config value from the server.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
configName | string |
Get the SNMPv3 device config details
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
deviceName | string |
Retrieves a list of all users in the group.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
groupName | string |
offset | int |
limit | int |
Get the group quota allocation settings on a given group.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with java.util.Hashtable<java.lang.String,java.lang.Object>, rejects on error
Param | Type |
---|---|
groupName | string |
Get the page cost if, and only if, the printer is using the Simple Charging Model.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with double, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
Get multiple printer properties at once (to save multiple calls).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
authToken | string |
serverName | string |
printerName | string |
propertyNames | array |
Gets a printer property.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
propertyName | string |
Get the SNMPv3 printer config details
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
The current account balance associated with a shared account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with double, rejects on error
Param | Type |
---|---|
accountName | string |
Get the shared account's overdraft mode
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
accountName | string |
Get multiple shared account properties at once (to save multiple calls).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
propertyNames | array |
Gets a shared account property.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
propertyName | string |
Return the status (completed flag and any status message text) associated with a long running task such as a sync operation started by the performGroupSync API.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with object, rejects on error
Get the count of all users in the system.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with int, rejects on error
The a user's current account balance.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with double, rejects on error
Param | Type |
---|---|
username | string |
The a user's current account balance.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with double, rejects on error
Param | Type |
---|---|
username | string |
accountName | string |
Retrieves a list of a user's group memberships.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
userName | string |
Get the user's overdraft mode
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
username | string |
Get multiple user properties at once (to save multiple calls).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
userName | string |
propertyNames | array |
Gets a user property.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
userName | string |
propertyName | string |
Install a new license
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
licenseFile | string |
Checks if group exists or not.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
groupName | string |
Test to see if a shared account exists.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
accountName | string |
Test to see if a user associated with "username" exists in the system.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
username | string |
List all printers sorted by printer name.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
offset | int |
limit | int |
List all shared accounts (sorted by account name) starting at offset and ending at limit.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
offset | int |
limit | int |
List all user accounts (sorted by username) starting at offset and ending at limit.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
offset | int |
limit | int |
List user groups.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
offset | int |
limit | int |
List all shared accounts (sorted by account name) that the user has access to, starting at offset and listing only limit accounts.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
userName | string |
offset | int |
limit | int |
List all shared accounts (sorted by account name) that the user has access to, starting at offset and listing only limit accounts.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
userName | string |
offset | int |
limit | int |
ignoreAccountMode | boolean |
Looks up the user with the given user card number and returns their user name.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
cardNo | string |
Looks up the user with the given email and returns their user name.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
string |
Looks up the user with the given user id number and returns their user name.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
idNo | string |
Looks up the user with the specified secondary user name and returns their primary user name.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
secondaryUserName | string |
Looks up the users with the given full name and returns their user names.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with array, rejects on error
Param | Type |
---|---|
fullName | string |
Start the process of synchronizing the system's group membership with the OS/Network/Domain's group membership.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Instigate an online backup.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Start a full user and group synchronization.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
An advanced version of the user and group synchronization process providing control over the sync behaviour.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
deleteNonExistentUsers | boolean |
updateUserDetails | boolean |
Takes the details of a job and logs and charges as if it were a "real" job.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
jobDetails | string |
Re-applies initial user settings on the given user.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
Removes a group from the list of admin groups.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
groupName | string |
Removes an admin user from the list of admins.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
userName | string |
Removes an already existing group.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
groupName | string |
Removes the group from the printer access group list.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
groupName | string |
Revoke the given group's access to the given shared account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
groupName | string |
Revoke the given user's access to the given shared account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
userName | string |
Removes the user from the specified group.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
userName | string |
groupName | string |
Rename a printer.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
newServerName | string |
newPrinterName | string |
Rename an existing shared account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
currentSharedAccountName | string |
newSharedAccountName | string |
Rename a user account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
currentUserName | string |
newUserName | string |
Reset the counts (pages and job counts) associated with a printer.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
resetBy | string |
Reset the counts (pages and job counts) associated with a user account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
resetBy | string |
Runs a custom command on the server.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
commandName | string |
args | array |
Saves the server thread snapshot to the debug log.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Set the config value from the server.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
configName | string |
configValue | string |
Set the group quota allocation settings on a given group.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
groupName | string |
quotaAmount | double |
period | string |
quotaMaxAccumulation | double |
Method to set a simple single page cost using the Simple Charging Model.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
costPerPage | double |
Set the printer groups a printer belongs to, overwriting any existing group.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
printerGroupNames | string |
Set multiple printer properties at once (to save multiple calls).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
authToken | string |
serverName | string |
printerName | string |
propertyNamesAndValues | array |
Sets a printer property.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
serverName | string |
printerName | string |
propertyName | string |
propertyValue | string |
Set the balance on a shared account to a set value.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
accountName | string |
balance | double |
comment | string |
Set the shared account's overdraft mode
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
accountName | string |
mode | string |
Set multiple shared account properties at once (to save multiple calls).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
propertyNamesAndValues | array |
Sets a shared account property.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
sharedAccountName | string |
propertyName | string |
propertyValue | string |
Set the balance on a user's account to a set value.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
balance | double |
comment | string |
Set the balance on a user's account to a set value.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
balance | double |
comment | string |
accountName | string |
Set the balance for each member of a group to the given value.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
group | string |
balance | double |
comment | string |
Set the balance for each member of a group to the given value.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
group | string |
balance | double |
comment | string |
accountName | string |
paperCut.setUserAccountSelectionAdvancedPopup(username, allowPersonal, chargeToPersonalWhenSharedSelected, defaultSharedAccount) ⇒ Promise
Change a user's account selection setting to use the advanced account selection pop-up.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
allowPersonal | boolean |
chargeToPersonalWhenSharedSelected | boolean |
defaultSharedAccount | string |
Sets the user to auto charge to it's personal account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
withPopupConfirmation | boolean |
paperCut.setUserAccountSelectionAutoSelectSharedAccount(username, accountName, chargeToPersonal) ⇒ Promise
Change a user's account selection setting to automatically charge to a single shared account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
accountName | string |
chargeToPersonal | boolean |
paperCut.setUserAccountSelectionStandardPopup(username, allowPersonal, allowListSelection, allowPinCode, allowPrintingAsOtherUser, chargeToPersonalWhenSharedSelected, defaultSharedAccount) ⇒ Promise
Change a user's account selection setting to use the standard account selection pop-up.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
allowPersonal | boolean |
allowListSelection | boolean |
allowPinCode | boolean |
allowPrintingAsOtherUser | boolean |
chargeToPersonalWhenSharedSelected | boolean |
defaultSharedAccount | string |
Set the user's overdraft mode
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
username | string |
mode | string |
Set multiple user properties at once (to save multiple calls).
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
userName | string |
propertyNamesAndValues | array |
Sets a user property.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with undefined, rejects on error
Param | Type |
---|---|
userName | string |
propertyName | string |
propertyValue | string |
Syncs an existing group with the configured directory server, updates the group membership.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with boolean, rejects on error
Param | Type |
---|---|
groupName | string |
Add the value of the a card to a user's account.
Kind: instance method of PaperCut
Returns: Promise
- Resolves with string, rejects on error
Param | Type |
---|---|
userName | string |
cardNumber | string |