/
Documents CLI Uploader

Documents CLI Uploader

Documents CLI Uploader is a command line interface (CLI) Java application that allows uploading files into Documents app. You can use this CLI application to build your own tool for migrating documents from another document management system towards Documents. The files are imported as new documents, no matter if they already exist or not.

NOTE If you want to synchronize files or folders with Documents via the command line interface, please use Documents CLI Sync . If you want to import or synchronize files or folders with a desktop GUI utility, please use Documents Bulk Uploader .

Prerequisites

  • Make sure that the latest version of the Documents app is installed on your Jira instance.

  • Java must be installed on the computer on which the Documents CLI Uploader is installed.
    Java can be downloaded from here: http://www.java.com/en/download/index.jsp

Uploading files with Documents CLI Uploader

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

Documents CLI Uploader

Compatible with

Documents CLI Uploader

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 Documents CLI Uploader v.3.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 Documents CLI Uploader v.2.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 documents.

admin

jira.password

The Jira user's password.

 

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-upload.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

Key of Target Folder - the key (Unique ID) of the folder in which the source file will be uploaded.

"102"

Param 2

Document Title - the title of the document.

"My Document"

Param 3

Source File Path - the local path of the file to be uploaded.

"c:\My Documents\FileToUpload.txt"

Param 4 (optional)

Sub-folder structure to be created in the target folder. The uploaded file will be created in the last sub-folder.

"Folder1/Folder2"

 

Example:

doc-upload.bat "102" "My Document" "c:\My Documents\FileToUpload.txt" "Folder1/Folder2"

In this example, a document of type File having title "My Document" and the file "FileToUpload.txt" attached will be created in sub-folder Folder1 > Folder2 of the target folder that has key 102.