This Celiveo WebAdmin command line API tool allows admin to import printers in bulk using CSV file, synchronize a printer and get its synchronization status. This command-line tool can also be invoked by third-party systems, by passing the right parameters. It responds using the correct return code at the standard output – stdout.

Location

The latest version of the Celiveo Web Admin Command Line API tool is available in the Web Admin installation directory, usually under C:\Program Files\Celiveo\Celiveo 8\API Tools

Call:

Calls to this API tool is performed from the Windows command-line interface (cmd.exe) or using Start-Process in Powershell or Process.Start() in C# or any other language’s method which spawns a process on Windows OS.

The API returns value zero when the call is successful with a response on stdout or non-zero when the call fails, with description on stdout.

Security:

This tool supports TLS 1.2 encryption or any protocol that is configured for the CeliveoDB SQL Server database access (defined in SQL Server).

It uses that protocol to encrypt communication to the SQL Server database.

Before you begin:

This tool needs the connection details to access the Web Admin database (CeliveoDB).

You can provide database information in one of the following two ways:

  • Copy ConnectionString.xml from Web Admin Server’s “C:\Program Files\Celiveo\Celiveo 8\Web Admin” to the directory where the command line API tool is installed and run. Ensure that the access to the directory containing the tool is secured to prevent unauthorized usage.
    The login information is read from that encrypted file and used to access the CeliveoDB database
    OR
  • Run the tool on the server where Web Admin is installed at “C:\Program Files\ Celiveo\Celiveo 8”
    Launch the command line tool with the syntax “cvocli.exe getstatus abc”.
    This is a one-time operation that asks for all Celiveo DB database details, they will be stored locally in an encrypted file and not requested again.

API to Import Printers into Celiveo WebAdmin

Purpose: This call initiates the import of printers from a CSV file into the Celiveo Web Admin software.
The information about the printer is obtained from the values provided in the CSV file.
You must have created and tested some master printers in the Celiveo WebAdmin software (Master Printers), that the imported printers will clone when being added through the API.

Example of process:

  • Create and configure a master printer in the Celiveo WebAdmin portal, its MAC Address is 00:8A:75:42:FE:1F.

Important: That printer to clone shall be of the exact same type as the imported printers that will clone it.
Examples:
If you want to import HP Futuresmart 3 or 4 printers, you must have defined an HP Futuresmart 3 or 4 master printer.
If you want to import Ricoh SOP 2.x printers, you must have defined a Ricoh SOP 2.x master printer.
If you want to import Lexmark Android-capable printers, you must have defined a Lexmark Android-capable master printer.
etc…

  • Build a CSV file where each line represents a printer to import into the Celiveo WebAdmin, and contains the MAC address of the printer to clone.
    The column content of the printer definition overrides those properties cloned from the master printer (ie: tags, name, description…)
  • run the import utility
  • synchronize the printer(s) using the Celiveo WebAdmin or the command-line tool

List of printers to import with master printer(s) cloning:

The CSV file needs to be created with one line per printer to inject, and each line data in the following format:

Acronyms: MP2C = Master Printer to clone and P2I = Printer to Import
Column 1 IPv4 MAC Address of MP2C
Format: 12:34:56:78:90:AB or 123456789AB
Column 2 HostName of P2I (string, max length= 250 chars)
Column 3 IPv4 Address of P2I
Format: xxx.xxx.xxx.xxx
Column 4 IPv4 MAC Address of P2I
Format: 12:34:56:78:90:AB or 123456789AB
Column 5 Serial number of P2I (string, max length = 50 chars)
Column 6 Printer model of P2I (string, max length = 250 chars)
The printer model must be solution-compatible with the MP2C printer model.
Column 7 Printer Brand of P2I (string, LEXMARK HP RICOH KM XEROX CANON TOSHIBA FUJI-XEROX KYOCERA etc…
The brand must be the exact same as the MP2C printer brand.
Column 8 Printer Description of P2I (string, max length = 250 chars)
Column 9 Printer Type for P2I (“MFP” or “SFP”)
The printer Type must be the exact same as the MP2C printer Type.
Column 10 Tag1 value of P2I (string, max length = 150 chars)
Column 11 Tag2 value of P2I (string, max length = 150 chars)
Column 12 Tag3 value of P2I (string, max length = 150 chars)
Column 13 Tag4 value of P2I (string, max length = 150 chars)
Column 14 Tag5 value of P2I (string, max length = 150 chars)
Column 15 Language of P2I (string, max length = 5 chars) using Language ISO format eg: en-US
Syntax cvocli.exe import < CSVPath >, where CSVPath is the full path to the CSV.
Example cvocli.exe import C:\Users\Documents\Printers\Printers.csv
Response Status Returns printer added or updated description, if successful:
Error Returns Error status and description if the printer is not able to be added.
0: Success
-1000: Invalid number of command-line parameters
1000: error connecting to CeliveoDB SQL database
1004: Invalid command

API to Synchronize a Printer

Purpose: This call synchronizes a printer present in the Celiveo Web Admin database, to load the printer agent and settings, as appropriate.
It is the same as syncing the printer from the Celiveo WebAdmin UI.

Note: The printer should have been created interactively in the Celiveo WebAdmin UI or through the “cvocli.exe import” call documented above.

Syntax For CSA-Based printers: cvocli.exe sync < filepath or IP Address > —csa
Filepath —> For multiple printers, path to the file – One IP per line.
IP Address —> IPv4 address for a single printer.
- For non-CSA based printers: cvocli.exe sync < filepath or IP Address >
Filepath —> For multiple printers, path to the file – One IP per line.
IP Address —> IPv4 address for a single printer.
Example cvocli.exe sync 192.168.4.45 -csa
cvocli.exe sync 192.168.4.45
Response No text output on stdout upon success or failure.
Return Code Returns Non-Zero code in case the printer does not exist in Web admin or for any other error.
0: Success
-1000: Invalid number of command-line parameters
1000: error connecting to CeliveoDB SQL database
1003: Printer to be synced does not exist in Web Admin database
1004: Invalid command

API to Get Synchronization Status of Printer present in Celiveo WebAdmin

Purpose: This call gets the status of printer present in Celiveo Web Admin.
The status of the printer is returned, that’s the value displayed in the Celiveo Web Admin UI.

Syntax cvocli.exe getstatus < filepath or IP Address >
Filepath —> For multiple printers, path to the file – One IP per line.
IP Address —> IPv4 address for a single printer.
Example cvocli.exe getstatus 192.168.4.145
Response Returns status of the printer if the call is successful:
Error
Configuration in progress
Synchronized
Sync failed: Could not connect to database
Sync failed: Unable to execute SQL procedure
Sync failed: No data
Sync failed: Unable to retrieve SQL configuration from Web Admin.
Sync failed: Internal error
Sync failed: Unknown error
Synchronized (Cost profile not set)
Synchronized (Print rules not set)
Synchronized (Cost profile and print rules not set)
Sync failed: No authentication configuration
Printer configuration in progress
Sync failed: upgrade Celiveo
Sync failed: Invalid printer credentials
Sync failed: Invalid AD/LDAP credentials
All embedded code packages loaded
Downloading Celiveo embedded solution
Sync failed: Unable to download Celiveo embedded solution
Sync failed: Unable to install Celiveo embedded solution
Configuring Celiveo embedded solution
Sync failed: Unable to configure Celiveo embedded solution
Installing Celiveo embedded solution
Sync failed: Printer is offline.
Not synchronized
Sync request sent
N/A
Ready for synchronization
Printer is unreachable
Sync failed
Sync failed: no answer from CSA
Ready for license synchronization
License update failed
License validation failed
Return code Returns Error status and description if the printer is not able to be added.
0: Success
-1000: Invalid number of command-line parameters
1000: error connecting to CeliveoDB SQL database
1004: Invalid command
Returns “Printer not found” on stderr for any other error.

API to delete a printer

Purpose: This call deletes a printer present in Celiveo Web Admin.

Syntax cvocli.exe delete < PrinterIP >, where PrinterIP is the IP address of the printer to delete.
Example cvocli.exe delete 192.168.4.45
Response Status Returns printer deleted, if successful:
Error Returns Error status and description if the printer is not able to be added.
0: Success
-1000: Invalid number of command-line parameters
1000: error connecting to CeliveoDB SQL database
1004: Invalid command

API update My Print Jobs UI language

Purpose: This will update My Print Jobs UI language to the selected printer.

Syntax cvocli.exe update-language < Printer IP or Printer Serial Number or Printer MacAddress >:< Language in xx-XX ISO Format >
Supported Languages en-US, cs-CZ, de-DE, es-ES, fi-FI, fr-FR, hu-HU, id-ID, it-IT , ja-JP, ko-KR, nl-NL, pl-PL, pt-BR, ru-RU, sk-SK, sv-SE, tr-TR, zh-CN, zh-TW
Example cvocli.exe update-language 192.168.4.45:en-US
Response Status Returns printer is updated , if successful:
Error Returns Error status and description if the printer is not able to be updated.
0: Success
-1000: Invalid number of command-line parameters
1000: error connecting to CeliveoDB SQL database
1004: Invalid command
Last modified: 25 September 2024

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment