Use Zenkit from the command-line and scripts. Read and update workspaces, lists, items, fields, and webhooks; and perform backups to json.
Installation
Install the executable with cargo install zenkit-cli.
Instructions for installing cargo are
here
Set the environment variable ZENKIT_API_TOKEN to your api token, which
you can obtain (even for the free-tier plan) from your Zenkit account.
Optional: To avoid re-typing -w WORKSPACE for every command for
the most-used workspace,
set the environment variable ZENKIT_WORKSPACE to the workspace name.
The -w WORKSPACE option always overrides ZENKIT_WORKSPACE.
zk Usage
Use zk -h for help.
For the commands below, the parameter values for
workspace, list, or field may be an object's id (int),
uuid, or display name. Values containing spaces or symbols should be
quoted.
All commands except workspaces require a -w workspace parameter or
require the environment variable ZENKIT_WORKSPACE to contain a
workspace name. The -w option is omitted below for brevity.
-
Show help
zk -h/--help -
Workspace commands
-
Show all workspaces and lists (accessible by your user)
zk workspacesOutput columns (tab-separated):- W/L: workspace or list
- id: object id (positive int)
- uuid: object uuid
- name: object name
-
Show users in workspace
zk usersOutput columns (tab-separated):- id
- uuid
- name
-
Show lists in workspace
zk listsOutput columns (tab-separated):- id
- uuid
- name
-
-
List commands
- Show items in a list
zk items -l listOutput columns (tab-separated):- id
- uuid
- name
- Show items in a list
-
List field/schema commands
-
Show fields for a list
zk fields -l listOutput columns (tab-separated):- id
- uuid
- name
-
Show choice values for a field
zk choices -l list -f fieldOutput columns (tab-separated):- id
- name
-
Describe field
zk field -l list -f fieldOutput format: Text object dump
-
-
Item commands
-
Show item detail
zk item -l list -i item_numOutput format: object dump (text) -
Set field value
zk set -l list -i item_num -f field [-t text] [-v value | -F file]The value can be specified on the command-line (-v) or from a file (-F).
For a field of type person, the value may be either the person's uuid or their display name (case-insensitive). For a field of type choice (category), the value may be the choice id, uuid, or display name(case-sensitive). For a field of type reference, the value must be the uuid of the related object.
-
Create item
zk create -l list -F field=value -F field=value ...jjValues may be of the format described above for "Set field value". Field names may be id, uuid, or display name (case-sensitive).
-
Add comment to an item
zk comment -l list -i item -c comment
-
-
Webhooks
-
Add a webhook
zk webhook --type triggger-type --url url [ OPTIONS ] -
Delete webhook
zk delete-webhook --webhook webhook -
List webhooks
zk list-webhooks
-
-
Backup
- Backup lists and field definitions to json files
zk backup -o output_dir [ -l list ]If no list is specified, all lists in the workspace are backed up.
- Backup lists and field definitions to json files