Files
wekan/docs/Features/ImportExport/ZenKit/ZenKit.md
T
Lauri Ojansivu 51238ed8ad Import: attachment files of Jira, Nextcloud Deck, OpenProject, Asana and GitLab.
Their exports name attachments without carrying the files, so the files
were reported as a loss. Each service documents where a file is
downloaded, behind the same sign-in as its API:

- Jira: fields.attachment[].content (/rest/api/3/attachment/content/<id>),
  Basic email:API token; Jira's redirect to its media store is followed
  without the sign-in.
- Deck: /index.php/apps/deck/api/v1.0|v1.1/boards/../stacks/../cards/..
  /attachments/<id>, Basic user:app password, OCS-APIRequest: true.
- OpenProject: _links.downloadLocation, relative to the instance, Basic
  apikey:<key>.
- Asana: GET /attachments/<gid>?opt_fields=download_url with a personal
  access token, then the signed download_url without it; a file the
  export embeds (export_boards.pl) is taken as it is; one kept on Google
  Drive and the like is a link, reported.
- GitLab: a private project's /uploads/ link through
  /api/v4/projects/<id>/uploads/<secret>/<file> (17.4+), Bearer token.

The import page asks for the address, user and token under "Attachment
files" for these five (the REST import takes the same as attachmentAuth).
They go with that one import: held beside the creator in a WeakMap, never
stored or logged, the token field emptied on Import, and sent ONLY to
the origin the member typed - an export names any URL it likes. Every
download is the import's SSRF-guarded fetch, which validates each hop
and drops Authorization on a cross-origin redirect. A file that cannot
be fetched is on the loss report with its reason. Unticking Attachments
leaves them out (Jira's per-issue field is pruned too).

Zenkit is left out: it publishes no way to download a file.

Tests: importAttachmentAuth.test.cjs (each service's request, the
sign-in only to its origin, malformed sign-ins, never stored or
logged), the parser tests pin the attachment lists, a Meteor test
imports an embedded Asana file onto its card and shows a Jira file is
reported without a sign-in and that the sign-in never reaches an address
the guard refuses, and import-attachment-auth.e2e.js the page (not run
here). Not run against the live services.

Thanks to xet7 !
2026-10-15 01:27:26 +03:00

9.1 KiB

Zenkit

WeKan imports boards from Zenkit and exports a board in the same shape. It reads two shapes of JSON: a list as Zenkit's API returns it (the list, its elements and its entries), and a simpler adapter shape { title, stages, items }. Stages become lists and items become cards. In WeKan's menus the tool is named Zenkit.

Zenkit does not publish a schema for its single-file JSON export, so WeKan does not claim to read that file; see Format details.

How to import

  1. Get the list as JSON. Two ways work:
    • From Zenkit's API: the list, its elements (the fields) and its entries in one object, as { "list": {...}, "elements": [...], "entries": [...] }.
    • In the adapter shape, written by hand or by a script of your own: { "title", "stages": [...], "items": [...] }. An earlier converter, very-rough-wekan-from-zk, is described in discussion #4487. Zenkit also offers Generate JSON in a list's settings (list actions). Its layout is not documented, so check the loss report after importing it.
  2. In WeKan, go to All Boards → New → Import → Zenkit.
  3. Paste the JSON into the text box. Tick the parts to import.
  4. Click Import. Zenkit has no member-mapping step in WeKan, so the people in the file do not become card members.
  5. Read the loss report on the import page. It is also kept in Admin Panel → Problems → Recovery.

How to import many boards at once

  • On the import page, under Import many boards, choose several Zenkit JSON files, or one .zip that holds them. Each file becomes its own board, imported without member mapping. Members can be mapped later. Click Import to import them.
  • The checkbox One board per project makes no difference for Zenkit: a list is imported into one swimlane, Default, so each file is always one board.
  • From a script: python3 api.py importboardsfrom zenkit FILE_OR_DIR ... takes files, directories of files, or .zip files.

How to export

  1. In WeKan, open the board, then Board Settings → Export.
  2. Under Select what to include:, tick the parts to export.
  3. Under JSON, choose Zenkit. The board downloads as a .json file in the adapter shape.
  4. Zenkit does not document a JSON import, so it cannot be said to read this file; see Zenkit's help. The file is what WeKan's own Zenkit import reads.

How to export all boards at once

  1. All Boards → sidebar → Export all boards, then choose Zenkit. This downloads one .zip with one Zenkit file per board you can export: boards you are a member of, that are not archived and are not templates. A board you may not export is left out and named in skipped.txt in the .zip.
  2. To export only some boards, use Multi-Selection in the All Boards sidebar, select the boards, then Export.

From a script: python3 api.py exportallboards zenkit boards.zip.

Format details

From the format coverage audit:

  • Current authoritative shape: the current documented export accepted by the selected Zenkit product.
  • Required import coverage: collections/lists, stages, items, hierarchy, members, dates, labels and exported custom fields; unknown fields are kept in the loss report because Zenkit products differ.
  • Zenkit is one of the external adapters that map the listed fields that have a WeKan equivalent: parent hierarchy and dependencies between items of the same import, custom-field values as typed board custom fields, start and creation dates, several assignees and source order. Creation dates survive the schema's createdAt autoValue through writeImportedEntity. Files, cross-list references and formula results are reported. Zenkit's API entries are read with the value keys its API client documents; its single-file export remains unverified because no schema is published.

What the current code does (parseZenkit in models/lib/externalParsers.js):

API shape. An entry's field values are keys named after the element: <uuid>_text, _number, _date, _categories_sort, _persons_sort and _references_sort.

  • The stage is the first categories field whose name says stage, status, state or column, else the first categories field. Its predefined categories give the list order; an entry without a stage goes to Inbox.
  • The description is a text field named description, notes or details. The due and start dates are date fields named due, deadline or end, and start or begin.
  • Other text, URL, number and date fields become custom fields. Other categories fields become labels.
  • Person fields give the owner and assignees, a hierarchy field the parent, and dependency fields related-to links.
  • Entries with deprecated_at (deleted) are skipped, with a warning. Entries are sorted by sortOrder.

Adapter shape. Each item may have title (or name), description (or notes), stage_name (or stageName, list), due (or dueDate, due_date), start, created_at, tags, assignee or assignees, id (or uuid), parent_id (or parentId), fields, comments and checklists. Any other key is reported.

What is kept

Zenkit WeKan
list.name (API), title (adapter) Board title
Stage List
displayString (API), title (adapter) Card title
Description field, description Card description
Due date and start date fields, due, start Due date, start date
created_at Creation date
Person fields, assignees Card members, when mapped
created_by_displayname (API) Requested by
Categories fields, tags Labels
Text, URL, number and date fields, fields Custom fields
uuid, id Source reference, for parent and dependency links
Hierarchy field, parent_id Parent card
Dependency fields (API) Related-to dependencies
checklists (name, items with text and checked) Checklists
comments (adapter) Comments

The export writes the adapter shape: title, a stage per list, and per card id, title, description, stage_name, due, tags, start, created_at, parent_id, the owner and further people as assignees, the custom fields as fields, the checklists and the comments.

What is not kept

The import reports these on the loss report:

  • file fields (files are not part of the export, and Zenkit publishes no API for downloading one, so WeKan does not fetch them);
  • reference fields to other lists;
  • formula fields (results are computed by Zenkit);
  • field types with no documented value format;
  • comments of API entries (comment_count: they are fetched separately from Zenkit);
  • unrecognized keys of adapter items;
  • deleted entries, as a warning;
  • more than 50 custom fields, duplicate ids, and parents or dependencies that point outside the file.

Zenkit has no member mapping in WeKan, so assignees do not become card members.

The export leaves out swimlanes, archived cards and lists, end dates, dependencies and attachments.

REST API

python3 api.py importboardfrom zenkit list.json               # POST /api/boards/import/zenkit
python3 api.py importboardsfrom zenkit a.json b.json dir/     # one board per file
python3 api.py exportboardformat BOARDID zenkit list.json     # GET /api/boards/BOARDID/export/zenkit?authToken=TOKEN
python3 api.py exportallboards zenkit boards.zip              # GET /api/export-all-boards/zenkit?authToken=TOKEN

GET /api/export-all-boards/zenkit?authToken=TOKEN&boardIds=ID1,ID2 exports only the boards listed.

How it is built and tested

  • models/lib/externalParsers.js (parseZenkit) reads both shapes. models/kanboardCreator.js creates the board, and models/lib/importedTaskPlan.js decides what each item becomes.
  • models/lib/externalExportFormatters.js (zenkit) writes the export, from what models/lib/externalExporters.js collects.
  • Unit tests: tests/zenkitImport.test.cjs, tests/importedTaskPlan.test.cjs and tests/externalExportRoundTrip.test.cjs. The fixtures are tests/fixtures/import-formats/zenkit-adapter.json and zenkit-api.json.
  • Playwright: tests/playwright/specs/import-export-format-audit.e2e.js (importing the adapter fixture through the page, refusing malformed JSON, and API entries importing stages, checklists, fields and hierarchy).

Sources

See also: format coverage, all formats.