Retrieving Baseline Items and Relationships via the Jama API

Carmen Santos
Carmen Santos
  • Updated

Audience: Everyone
Environmental Details: Cloud, Customer Validated Cloud (CVC), Self-hosted (v9.17.x, 9.22.x, 9.28.x)

Summary 

This article explains how to retrieve baseline items and their associated relationships using the Jama API. It clarifies why relationships must be fetched separately and outlines an alternative method to reduce the number of API calls.

IMPORTANT: Access to the REST API is limited to users with a Named Creator Jama Connect license, including endpoints in v1, labs, and SCIM. Users without a Named Creator Jama Connect license, including those with a Creator Float License, do not have access.

Solution 

The Jama API allows you to retrieve baseline items and their versioned relationships using dedicated calls. The recommended approach is:

  1.  Retrieve baseline items:

GET /baselines/{baselineId}/versioneditems
  • Returns up to 50 items per API call.

  2.  Retrieve relationships for each item:

GET /baselines/{baselineId}/versioneditems/{itemId}/versionedrelationships
  • Must be called for each item individually.

Cause

The Jama API is designed to return baseline items and relationships separately. The /baselines/{baselineId}/versioneditems endpoint returns only items, requiring additional calls per item to access their relationships.

While it is possible to reduce the number of API calls by using the general /relationships endpoint with lastId paging, this endpoint returns current relationships rather than baseline versioned relationships.

Therefore, although you can retrieve many relationships in fewer calls, this method may not be suitable for all use cases.

Steps for this alternative approach:

  • Use the general /relationships endpoint with  to retrieve multiple relationships in fewer calls.
  • Filter the results to include only the items relevant to your baseline.

Additional Resources

 

Feedback:
We welcome your input! Please leave any comments, suggestions, or improvement ideas below.

 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.