The Zegami Command Line Interface (CLI) allows administrators to manage Zegami server, collections and users.
The Zegami CLI can be executed from the command line and the –help (or -h) option can be used on any command to find out more.
In general the Zegami CLI is used by selecting the resource, then an action for the resource. Before using the client, switch to the zegami user and the zegami base directory.
Zegami comes built in with a simple web server. To start it run
Collections can be created via the CLI. For a step-by-step see our tutorial on creating a collection.
The default arguments for creating a collection are the collection name, path to the data source conf file and path to the image source conf file.
The following optonal arguments can also be used
The data source plugin to use. Out-of-the-box the following data source plugins are available:
The image source plugin to use. Out-of-the-box the following image source plugins are available:
The size of the Deep Zoom tile. The default is 256.
If the optional collection id is specified then it will update the parameters for an existing collection.
The following is an example of using the explicit parameters:
Example of how to update the parameters of an existing collection:
Listing all available collections
Process a collection by id, where `556eb6b05f1c37459b3ac5ff` is the collection id.
Remove (delete) a collection by id, where `556eb6b05f1c37459b3ac5ff` is the collection id
There are two options for creating a user – using the optional arguments or in interactive mode.
Users created via the CLI are automatically assinged the Administrator role. A users role can be changed using the modify command.
Interactive mode is triggered by calling `users create` without any arguments. You will then be prompted to enter the users details:
Alternatively the following arguments can be used:
The username of the new user.
The users password
The first name of the user
The users last name
The email address
List all users
Modify an existing users Role.
The default arguments for modifying a user is the username followed by the new Role.
Possible Role values are:
The following example will put user1 in the user role.
Deletes a user by username.
The following example will delete user1.
The following example will display latest 50 server log entries.
The following example will display latest 50 web log entries.
Search for logs by specific level by adding optional argument -l LEVEL or –level LEVEL
Level of logs to look for – could be “DEBUG”, “INFO”, “WARNING”, “CRITICAL”, “ERROR”.
The following example will search logs with level ERROR.
Use optional argument -timestamp TIMESTAMP, –timestamp TIMESTAMP.
The following example will search logs before the specified timestamp.
python bin/zegami.pyc tail logs --timestamp "2017-04-13 13:06:12,345"
Powered by BetterDocs