Information Technology Reference
In-Depth Information
How to do it…
To use the Atlassian CLI tool, we first need to enable the Remote API from JIRA:
1. Navigate to
Administration
|
System
|
General Configuration
.
2. Click on the
Edit Settings
button.
3. Turn on the
Accept Remote API
call settings.
4. Click on
Update
to apply the change.
You then need to install the Atlassian CLI tool by unzipping it to a convenient location on
your workstation. Next, update the
jira.sh
(for UNIX) or
jira.bat
(for Windows)
file to add in JIRA's details.
For example, as shown in the following command, JIRA is running on
ht-
tp://localhost:8080
, and the administrator credential is
admin_user
with
ad-
min_password
as the password:
java -jar 'dirname $0'/lib/jira-cli-3.8.0.jar --server
http://localhost:8080 --user admin_user --password
admin_password "$@"
So now that we have everything set up, we can run the following command to create a new
user in JIRA:
./jira.sh --action addUser --userId tester --userEmail
tester@company.com --userFullName Tester
You should get a response as shown in the following code:
User: tester added with password: 89u66p3mik5q. Full name
is: Tester. Email is: tester@company.com.