/
Documents CLI Sync

Documents CLI Sync

Documents CLI Sync is a Command Line Interface (CLI) Java application that allows synchronizing the content of a file or folder located on your local computer with a corresponding file or folder from Documents. You can use it to automate various tasks that require updating the content of a file or folder.

The synchronization is one-way: from your local computer to Documents app. This means that only the changes made on your local computer are propagated to the corresponding file or folder from Documents and not vice-versa. If no corresponding files or folders exist in Documents, they will be created during the sync process.

NOTE If you want to import files via the command line interface, please use https://stonikbyte-production.atlassian.net/wiki/spaces/DFJDC/pages/64618498. If you want to import or synchronize files or folders with a desktop GUI utility, please use https://stonikbyte-production.atlassian.net/wiki/spaces/DFJDC/pages/64651266.

Prerequisites

Using Documents CLI Sync

  • Download the version of your Documents CLI Sync compatible with your Jira:

Documents CLI Sync

Compatible with

Documents CLI Sync

Compatible with

Jira 10.2 or newer

Jira 8.20 to 10.1

  • Extract the content of the ZIP archive on your computer

  • Open the app.properties file from the bin folder for editing.

  • If you use Document CLI Sync v3.0.0, set the application settings as indicated in the table below and save the changes.

Setting

Description

Example of valid value

Setting

Description

Example of valid value

jira.base.url

The Jira Base URL. Make sure not to specify the trailing slash at the end.

https://myjiraserver/jira

jira.personalAccessToken

The access token of the Jira user used for authentication. The user must have the necessary permissions for creating and editing documents.

To create or get a token, log in to Jira, click your profile avatar from top-right corner, click Profile and then click Personal Access Tokens.

MzgxMjc0MDMzMTAzOjTkaoJG1+x/l0biVm8Ptr3X7Nmw

jira.ignore.ssl.certificate.errors

Set to 1 if you want the potential SSL certificate errors to be ignored. Otherwise, set it to 0.

1

  • If you use Document CLI Sync v2.1.0, set the application settings as indicated in the table below and save the changes.

Setting

Description

Example of valid value

Setting

Description

Example of valid value

jira.base.url

The Jira Base URL. Make sure not to specify the trailing slash at the end.

https://myjiraserver/jira

jira.username

The Jira users used for authentication. The user must have the necessary permissions for creating and editing documents.

admin

jira.password

The Jira user's password.

!jT4Qt4£M8w\

jira.ignore.ssl.cerficate.errors

Set to 1 if you want the potential SSL certificate errors to be ignored. Otherwise, set it to 0.

1

  • Open a command prompt and execute doc-sync.bat from the bin folder with the following command line parameters:

Parameter

Description

Example of valid value

Parameter

Description

Example of valid value

Param 1

Source File or Folder Path - the local path of the file or folder to be synchronized.

"c:\My Documents\FileToSync.txt" or "c:\My Documents\FolderToSync"

Param 2

Key of Target Folder - the key (unique ID) of the folder from Documents that hosts the corresponding file or folder.

"102"

 

Example 1:

doc-sync.bat "c:\My Documents\FileToSync.txt" "102"

In this example, a local document of type File named "FileToSync.txt" will be syncronized with its corresponding file from Documents that is located in the folder that has key 102. If no corresponding file exists in Documents, it will be created during the sync process.

 

Example 2:

doc-sync.bat "c:\My Documents\FolderToSync" "102"

In this example, the contents of local folder named "FolderToSync" will be syncronized with the contents of the folder from Documents that has key 102.