jamasoftware-ps / py-jama-rest-client

A client for the Jama Connect REST API implemented in python.
MIT License
34 stars 43 forks source link

Jama Software

Jama Software is the definitive system of record and action for product development. The company’s modern requirements and test management solution helps enterprises accelerate development time, mitigate risk, slash complexity and verify regulatory compliance. More than 600 product-centric organizations, including NASA, Boeing and Caterpillar use Jama to modernize their process for bringing complex products to market. The venture-backed company is headquartered in Portland, Oregon. For more information, visit jamasoftware.com.

Please visit dev.jamasoftware.com for additional resources and join the discussion in our community community.jamasoftware.com.

py-jama-rest-client

py-jama-rest-client by Jama Software is a Python REST API client for Jama Connect™. The client will allow customers to easily access the REST API to retrieve, and modify data within their Jama Instance.

Please note that this client is distributed as-is as an example and will likely require modification to work for your specific use-case.

Requirements

Setup

Create a new directory and install py-jama-rest-client using pipenv.

 mkdir example_project
 cd example_project
 pipenv --python 3.7
 pipenv install py-jama-rest-client

REST Calls Supported in the Client

API information
Abstract Items
Attachments
Baselines
Filters
Items
Relationship Rule Sets
Relationship Types
Item Types
Pick lists
Pick list options
Projects:
Tags
Test Cycles
Test Plans
Test Runs
Users
Relationships

Usage Examples

Client instantiation

To instantiate a Basic authentication client:

from py_jama_rest_client.client import JamaClient

basic_auth_client = JamaClient('https://yourdomain.jamacloud.com', credentials=('username', 'password'))

To instantiate a OAuth authenticated client:

from py_jama_rest_client.client import JamaClient

oauth_client = JamaClient('https://yourdomain.jamacloud.com', credentials=('clientID', 'ClientSecret'), oauth=True)

Logging

The Py Jama Rest Client will log API messages to the logger 'py_jama_rest_client' you can get this logger for setup / customization by calling logging.getLogger('py_jama_rest_client')

Get all projects

1) Download get_all_projets.py to your example_project directory 2) Enter your Jama URL, username, and password into the corrisponding variables at the top of the file. 3) To execute the script execute the following form your example_project directory:

    pipenv run python get_all_projects.py

Additional Documentation