Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example Command Usage

listissues

Required: Authentication to a user who has browsing rights for this Jira Server.List issues for project with "id" attribute EXAMPLEPROJECTNAME

Code Block
collapsetrue
jira-client listissues EXAMPLEPROJECTNAME

Example Output:


Code Block
EXAMPLEPROJECTNAME-2 (Bug):
Priority 3 - Heavy
DB leaks lead to security invulnerabilities
Created by John Doe at Thu, 14.06.2012 17:39:21 (UTC+02:00)
Assigned to Will Dugh
Last updated: Tue, 13.11.2012 17:26:06 (UTC+01:00)
----------------------------
EXAMPLEPROJECTNAME-1 (Feature):
Priority 4 - Minor
Should allow filtering of currently online users
Created by Will Dugh at Wed, 14.06.2012 17:39:21 (UTC+02:00)
Assigned to Nobody
Last updated: Never
----------------------------


createissue

Create an issue for EXAMPLEHOSTINGNAME project which is a Bug with Priority Minor(4):

Code Block
jira-client createissue EXAMPLEPROJECTNAME "This is the headline" "This is a multi-lined\ndescription" Bug 4

No output when successful.

initconfig

Initialize the user config file from scratch interactively:

Code Block
> jira-client initconfig

Enter config file path (Alternatively enter 'u' for user or 'g' for global config): 

> u

Enter remaining configurable values, leave empty to ignore:

username: > johndoe
password: > notapassword123
oAuthToken:
consumerKey: > notakey987
consumerSecret:
authMethod: > OAUTH
privateKeyLocation: > /home/johndoe/mykeyring/pkey.pem
baseurl: > https://jira.mydomain.com

This will set username, password, consumerKey, authMethod, privateKeyLocation and baseurl to the specified values and leave the rest alone.


Initialize a config file to a custom path with all parameters already set:

Code Block
> jira-client initconfig --conffile /home/johndoe/customjira.conf --username johndoe --password notapw123 --oauthtoken Jb72NuBYBvT9zfrYfXCzdfF7y11X6ewC -oauthsecrettoken lxpMs8QIllXE3Y9kxGu3yakyyqHs5kh3 -auth OAUTH -consumersecret notasecret1923 -consumerkey notakey29 --pkeyloc /home/johndoe/mykeyring/pkey.pem --baseurl https://jira.mydomain.com

No output if successful.

createoauth

Can only be done interactively because OAuth1.0a requires manual user authentication.

Creating the OAuthToken and saving it to user config file:

Code Block
> jira-client createoauth
Request token recieved, please authorize me in the Browser via the following URL:
https://jira.mydomain.com/plugins/servlet/oauth/authorize?oauth_token=60uUqPdN237z3qjOCafLeNWHJHO2g6zw

Have you authorized me? (Y/n) 

--(Manual authentication in browser)--

> Y

{'oauth_token': 'yPpXwNyWeLpc923qIpKvMLCabVqztb28', 'oauth_token_secret': 'uDtPg6ePeKWG9JsNZZblubAWfnwbCoNl', 'oauth_expires_in': '157680000', 'oauth_session_handle': 'bmF8KVnnF2AMwUX6AAZ8P5Oc3WtS0b5A', 'oauth_authorization_expires_in': '160272000'}
Save OAuth Token to user or global config, or none (u/g/n)? 
Alternatively, enter a custom absolute file path(starting with /):

> u