Skip to content

systelab/jama-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jama API

Description

Use this library to access to your JAMA Contour instance. The source code was generated with Swagger Codegen with the following command.

java -jar swagger-codegen-cli-3.0.0.jar generate -i swagger.json -l java

Getting Started

To get you started you can simply clone the jama-api repository and install the dependencies:

Prerequisites

You need git to clone the jama-api repository.

You will need Java™ SE Development Kit 8 and Maven.

Clone jama-api

Clone the jama-api repository using git:

git clone https://github.com/systelab/jama-api.git
cd jama-api

Publish

Generate the JAR by executing:

mvn package

Create a new release in the GitHub repository, for example v1.0.0 and add the generated jama-api-1.0.0.jar file to the release.

Then browse to https://jitpack.io/ and follow the instructions. JitPack is an easy to use package repository for Git.

Use the Library

Maven users

Add the https://jitpack.io repository to your project's POM:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Add the dependency:

<dependency>
	<groupId>com.github.systelab</groupId>
	<artifactId>jama-api</artifactId>
    <version>v1.0.0</version>
</dependency>

and simply execute:

mvn install

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/jama-api-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AbstractitemsApi;

import java.io.File;
import java.util.*;

public class AbstractitemsApiExample {

    public static void main(String[] args) {
        ApiClient client = Configuration.getDefaultApiClient();
        client.setBasePath("https://127.0.0.1/contour/rest/latest");

        // Configure HTTP basic authorization: basic
        HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
        basic.setUsername("YOUR USERNAME");
        basic.setPassword("YOUR PASSWORD");


        ProjectsApi api=new ProjectsApi();
        try {
            Project project=api.getProject(new Integer(30),null).getData();
        } catch (ApiException e) {
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://jama.systelab.net/contour/rest/latest

Class Method HTTP request Description
AbstractitemsApi getAbstractItems GET /abstractitems Search for items, test plans, test cycles, test runs, or attachments
AbstractitemsApi getItem GET /abstractitems/{id} Get any item, test plan, test cycle, test run, or attachment with the specified ID
AbstractitemsApi getVersionOnItem GET /abstractitems/{id}/versions/{versionNum} Get the numbered version for the item with the specified ID
AbstractitemsApi getVersionedItem GET /abstractitems/{id}/versions/{versionNum}/versioneditem Get the snapshot of the item at the specified version
AbstractitemsApi getVersionedRelationships GET /abstractitems/{id}/versionedrelationships Get all versioned relationships that were associated to the item at the specified time
AbstractitemsApi getVersionsOnItem GET /abstractitems/{id}/versions Get all versions for the item with the specified ID
ActivitiesApi getActivities GET /activities Get all activities in the project with the specified ID
ActivitiesApi getActivityById GET /activities/{activityId} Get the activity with the specified ID
ActivitiesApi getAffectedItems GET /activities/{activityId}/affecteditems Get all items affected by the activity with the specified ID
ActivitiesApi restoreItems POST /activities/{activityId}/restore Restore item(s) associated with a delete activity.
AttachmentsApi downloadFile GET /attachments/{attachmentId}/file Download attachment file from the attachment with the specified ID
AttachmentsApi getAttachmentItem GET /attachments/{attachmentId} Get the attachment with the specified ID
AttachmentsApi getItemComments GET /attachments/{attachmentId}/comments Get all comments for the item with the specified ID
AttachmentsApi getLock GET /attachments/{attachmentId}/lock Get the locked state, last locked date, and last locked by user for the item with the specified ID
AttachmentsApi getVersionOnItem1 GET /attachments/{attachmentId}/versions/{versionNum} Get the numbered version for the item with the specified ID
AttachmentsApi getVersionedItem1 GET /attachments/{attachmentId}/versions/{versionNum}/versioneditem Get the snapshot of the attachment at the specified version
AttachmentsApi getVersionsOnItem1 GET /attachments/{attachmentId}/versions Get all versions for the item with the specified ID
AttachmentsApi updateLock PUT /attachments/{attachmentId}/lock Update the locked state of the item with the specified ID
AttachmentsApi uploadFile PUT /attachments/{attachmentId}/file Upload attachment file to the attachment with the specified ID
BaselinesApi getBaseline GET /baselines/{baselineId} Get the baseline with the specified ID
BaselinesApi getBaselines GET /baselines Get all baselines in the project with the specified ID
BaselinesApi getRelationshipsForVersion GET /baselines/{baselineId}/versioneditems/{itemId}/versionedrelationships Get all versioned relationships for the item in the baseline
BaselinesApi getVersionedItem GET /baselines/{baselineId}/versioneditems/{itemId} Get the baseline item with the specified ID in a baseline with the specified ID
BaselinesApi getVersionedItems GET /baselines/{baselineId}/versioneditems Get all baseline items in a baseline with the specified ID
CommentsApi addComment POST /comments Create a new comment
CommentsApi getComment GET /comments/{id} Get the comment with the specified ID
CommentsApi getComments GET /comments Get all comments viewable by the current user
CommentsApi getReplies GET /comments/{id}/replies Get all reply comments for the comment with the specified ID
FilesApi downloadFile GET /files Download attachment file from the attachment with the specified Jama URL
FiltersApi getFilter GET /filters/{id} Get the filter with the specified ID
FiltersApi getFilters GET /filters Get all filters in the project with the specified ID viewable by the current user
FiltersApi getResults GET /filters/{id}/results Get all result items for the filter with the specified ID
ItemsApi addAttachmentToItem POST /items/{id}/attachments Add an existing attachment to the item with the specified ID
ItemsApi addItem POST /items Create a new item
ItemsApi addItemLink POST /items/{id}/links Create a new link for the item with the specified ID
ItemsApi addTagToItem POST /items/{id}/tags Add an existing tag to the item with the specified ID
ItemsApi breakSyncOnItem DELETE /items/{id}/synceditems/{syncedItemId} Remove an existing item from the Global ID pool of the item with the specified ID (break sync)
ItemsApi connectItemToGlobalIDPool POST /items/{id}/synceditems Add an existing item to the Global ID pool of the item with the specified ID
ItemsApi deleteItem DELETE /items/{id} Delete the item with the specified ID (item becomes inactive and can be un-deleted if necessary)
ItemsApi deleteItemLink DELETE /items/{id}/links/{linkId} Delete the link with the specified ID
ItemsApi duplicateItem POST /items/{id}/duplicate Create a duplicate of item
ItemsApi executeTransition POST /items/{id}/workflowtransitions Executes a workflow transition for the item with the specified ID. Valid transitions can be found at /items/{id}/workflowtransitionoptions
ItemsApi getActivities GET /items/{id}/activities Get all activities for the item with the specified ID
ItemsApi getAttachments GET /items/{id}/attachments Get all attachments for the item with the specified ID
ItemsApi getChildItems GET /items/{id}/children Get all children items for the item with the specified ID
ItemsApi getDownstreamRelated GET /items/{id}/downstreamrelated Get all downstream related items for the item with the specified ID
ItemsApi getDownstreamRelationships GET /items/{id}/downstreamrelationships Get all downstream relationships for the item with the specified ID
ItemsApi getItem GET /items/{id} Get the item with the specified ID
ItemsApi getItemComments GET /items/{id}/comments Get all comments for the item with the specified ID
ItemsApi getItemLinks GET /items/{id}/links Get all links for the item with the specified ID
ItemsApi getItems GET /items Get all items in the project with the specified ID
ItemsApi getLinkById GET /items/{id}/links/{linkId} Get the link with the specified ID
ItemsApi getLocation GET /items/{id}/location Get the location for the item with the specified ID
ItemsApi getLock GET /items/{id}/lock Get the locked state, last locked date, and last locked by user for the item with the specified ID
ItemsApi getParentItem GET /items/{id}/parent Get the parent item for the item with the specified ID
ItemsApi getSyncItems GET /items/{id}/synceditems Get all synchronized items for the item with the specified ID
ItemsApi getSyncStatus GET /items/{id}/synceditems/{syncedItemId}/syncstatus Get the sync status for the synced item with the specified ID
ItemsApi getTagOnItem GET /items/{id}/tags/{tagId} Get the tag with the specified ID
ItemsApi getTagsOnItem GET /items/{id}/tags Get all tags for the item with the specified ID
ItemsApi getUpstreamRelated GET /items/{id}/upstreamrelated Get all upstream related items for the item with the specified ID
ItemsApi getUpstreamRelationships GET /items/{id}/upstreamrelationships Get all upstream relationships for the item with the specified ID
ItemsApi getVersionOnItem2 GET /items/{id}/versions/{versionNum} Get the numbered version for the item with the specified ID
ItemsApi getVersionedItem2 GET /items/{id}/versions/{versionNum}/versioneditem Get the snapshot of the item at the specified version
ItemsApi getVersionsOnItem2 GET /items/{id}/versions Get all versions for the item with the specified ID
ItemsApi getWorkflowTransitionOptions GET /items/{id}/workflowtransitionoptions Get all valid workflow transitions that can be made on the item with the specified ID
ItemsApi patchItem PATCH /items/{id} Update the item with the specified ID
ItemsApi putItem PUT /items/{id} Update the item with the specified ID
ItemsApi removeAttachmentFromItem DELETE /items/{id}/attachments/{attachmentId} Remove an existing attachment from the item
ItemsApi removeTagFromItem DELETE /items/{id}/tags/{tagId} Remove an existing tag from the item with the specified ID
ItemsApi updateItemLink PUT /items/{id}/links/{linkId} Update the link with the specified ID
ItemsApi updateLocation PUT /items/{id}/location Update the location for the item with the specified ID as an asynchronous request (a successful response signifies that the work was started and a work identifier is given. This identifier will be used in a future feature). Any child items are moved along with this item. Note that this currently only supports moving items between projects
ItemsApi updateLock PUT /items/{id}/lock Update the locked state of the item with the specified ID
ItemtypesApi getItem GET /itemtypes/{itemTypeId} Get the item type with the specified ID
ItemtypesApi getItemTypes GET /itemtypes Get all item types
PicklistoptionsApi getPicklistOption GET /picklistoptions/{picklistOptionId} Get the pick list option with the specified ID
PicklistoptionsApi updatePicklistOption PUT /picklistoptions/{picklistOptionId} Update the pick list option with the specified ID
PicklistsApi addPickListOptionToPickList POST /picklists/{picklistId}/options Create a new pick list option for the pick list with the specified ID
PicklistsApi getPickList GET /picklists/{picklistId} Get the pick list with the specified ID
PicklistsApi getPickListOptions GET /picklists/{picklistId}/options Get all pick list options for the pick list with the specified ID
PicklistsApi getPickLists GET /picklists Get all pick lists
ProjectsApi addProject POST /projects Create a new project
ProjectsApi getItemTypesInProject GET /projects/{projectId}/itemtypes Get all item types for the project with the specified ID
ProjectsApi getProject GET /projects/{projectId} Get the project with the specified ID
ProjectsApi getProjects GET /projects Get all projects
ProjectsApi getTagsInProject GET /projects/{projectId}/tags Get all tags for the project with the specified ID
ProjectsApi postAttachment POST /projects/{projectId}/attachments Create a new attachment in the project with the specified ID
ProjectsApi putProject PUT /projects/{projectId} Update the project with the specified ID
RelationshipsApi clearSuspectLink DELETE /relationships/{relationshipId}/suspect Remove an existing suspect link for the relationship with the specified ID
RelationshipsApi createRelationship POST /relationships Create a new relationship
RelationshipsApi deleteRelationship DELETE /relationships/{relationshipId} Delete the relationship with the specified ID
RelationshipsApi getRelationship GET /relationships/{relationshipId} Get the relationship with the specified ID
RelationshipsApi getRelationships GET /relationships Get all relationships in the project with the specified ID
RelationshipsApi updateRelationship PUT /relationships/{relationshipId} Update the relationship with the specified ID
RelationshiptypesApi getRelationshipType GET /relationshiptypes/{id} Get the relationship type with the specified ID
RelationshiptypesApi getRelationshipTypes GET /relationshiptypes Get all relationship types
ReleasesApi addRelease POST /releases Create a new release
ReleasesApi getRelease GET /releases/{releaseId} Get the release with the specified ID
ReleasesApi getReleases GET /releases Get all releases in the project with the specified ID
ReleasesApi putRelease PUT /releases/{releaseId} Update the release with the specified ID
SystemApi getDomains GET /system/settings/corsdomains Get the current CORS domain whitelist
SystemApi setDomains POST /system/settings/corsdomains Update CORS domain whitelist
TagsApi addTagToProject POST /tags Create a new tag in the project with the specified ID
TagsApi deleteTag DELETE /tags/{id} Delete the tag with the specified ID
TagsApi getItemsUsingTag GET /tags/{id}/items Get all items that have the tag with the specified ID
TagsApi getTag GET /tags/{id} Get the tag with the specified ID
TagsApi getTagsInProject GET /tags Get all tags for the project with the specified ID
TagsApi putTag PUT /tags/{id} Update the tag with the specified ID
TestcyclesApi deleteTestCycle DELETE /testcycles/{testCycleId} Delete the test cycle with the specified ID, including the test runs in the test cycle
TestcyclesApi getTestCycle GET /testcycles/{testCycleId} Get the test cycle with the specified ID
TestcyclesApi getTestCycleTestGroup GET /testcycles/{testCycleId}/testgroup/{testGroupId} Get the test cycle test group for the test cycle with the specified ID
TestcyclesApi getTestRuns GET /testcycles/{testCycleId}/testruns Get all test runs for the test cycle with the specified ID
TestcyclesApi getVersionOnItem3 GET /testcycles/{testCycleId}/versions/{versionNum} Get the numbered version for the item with the specified ID
TestcyclesApi getVersionedItem3 GET /testcycles/{testCycleId}/versions/{versionNum}/versioneditem Get the snapshot of the test cycle at the specified version
TestcyclesApi getVersionsOnItem3 GET /testcycles/{testCycleId}/versions Get all versions for the item with the specified ID
TestcyclesApi patchTestCycle PATCH /testcycles/{testCycleId} Update the test cycle with the specified ID, including regenerating the test runs in the test cycle
TestcyclesApi updateTestCycle PUT /testcycles/{testCycleId} Update the test cycle with the specified ID, including regenerating the test runs in the test cycle
TestplansApi addAttachmentToItem POST /testplans/{id}/attachments Add an existing attachment to the item with the specified ID
TestplansApi addItemLink POST /testplans/{id}/links Create a new link for the item with the specified ID
TestplansApi addTagToItem POST /testplans/{id}/tags Add an existing tag to the item with the specified ID
TestplansApi addTestGroup POST /testplans/{id}/testgroups Create a new test group to the test plan with the specified ID
TestplansApi createTestCycle POST /testplans/{id}/testcycles Create a new test cycle
TestplansApi createTestPlan POST /testplans Create a new test plan
TestplansApi deleteItemLink DELETE /testplans/{id}/links/{linkId} Delete the link with the specified ID
TestplansApi deleteTestCase DELETE /testplans/{id}/testgroups/{testGroupId}/testcases/{testCaseId} Remove an existing test case from the test group
TestplansApi deleteTestGroup DELETE /testplans/{id}/testgroups/{testGroupId} Delete the test group with the specified ID
TestplansApi deleteTestPlan DELETE /testplans/{id} Delete the test plan with the specified ID
TestplansApi getActivities GET /testplans/{id}/activities Get all activities for the test plan with the specified ID
TestplansApi getAttachments GET /testplans/{id}/attachments Get all attachments for the item with the specified ID
TestplansApi getDownstreamRelated GET /testplans/{id}/downstreamrelated Get all downstream related items for the test plan with the specified ID
TestplansApi getDownstreamRelationships GET /testplans/{id}/downstreamrelationships Get all downstream relationships for the test plan with the specified ID
TestplansApi getItemComments GET /testplans/{id}/comments Get all comments for the item with the specified ID
TestplansApi getItemLinks GET /testplans/{id}/links Get all links for the item with the specified ID
TestplansApi getLinkById GET /testplans/{id}/links/{linkId} Get the link with the specified ID
TestplansApi getLock GET /testplans/{id}/lock Get the locked state, last locked date, and last locked by user for the item with the specified ID
TestplansApi getTagOnItem GET /testplans/{id}/tags/{tagId} Get the tag with the specified ID
TestplansApi getTagsOnItem GET /testplans/{id}/tags Get all tags for the item with the specified ID
TestplansApi getTestCaseById GET /testplans/{id}/testgroups/{testGroupId}/testcases/{testCaseId} Get the test case with the specified ID
TestplansApi getTestCases GET /testplans/{id}/testgroups/{testGroupId}/testcases Get all test cases associated with the test group with the specified ID
TestplansApi getTestCycles GET /testplans/{id}/testcycles Get all test cycles for the test plan with the specified ID
TestplansApi getTestGroupById GET /testplans/{id}/testgroups/{testGroupId} Get the test group with the specified ID
TestplansApi getTestGroups GET /testplans/{id}/testgroups Get all test groups for the test plan with the specified ID
TestplansApi getTestPlan GET /testplans/{id} Get the test plan with the specified ID
TestplansApi getTestPlans GET /testplans Get all test plans in the project with the specified ID
TestplansApi getUpstreamRelated GET /testplans/{id}/upstreamrelated Get all upstream related items for the test plan with the specified ID
TestplansApi getUpstreamRelationships GET /testplans/{id}/upstreamrelationships Get all upstream relationships for the test plan with the specified ID
TestplansApi getVersionOnItem4 GET /testplans/{id}/versions/{versionNum} Get the numbered version for the item with the specified ID
TestplansApi getVersionedItem4 GET /testplans/{id}/versions/{versionNum}/versioneditem Get the snapshot of the test plan at the specified version
TestplansApi getVersionsOnItem4 GET /testplans/{id}/versions Get all versions for the item with the specified ID
TestplansApi patchTestPlan PATCH /testplans/{id} Update the test plan with the specified ID
TestplansApi postTestCase POST /testplans/{id}/testgroups/{testGroupId}/testcases Add an existing test case to the test group with the specified ID
TestplansApi removeAttachmentFromItem DELETE /testplans/{id}/attachments/{attachmentId} Remove an existing attachment from the item
TestplansApi removeTagFromItem DELETE /testplans/{id}/tags/{tagId} Remove an existing tag from the item with the specified ID
TestplansApi toggleArchivedStatus PUT /testplans/{id}/archived Update the archived status of the test plan
TestplansApi updateItemLink PUT /testplans/{id}/links/{linkId} Update the link with the specified ID
TestplansApi updateLock PUT /testplans/{id}/lock Update the locked state of the item with the specified ID
TestplansApi updateTestGroup PUT /testplans/{id}/testgroups/{testGroupId} Update the test group with the specified ID
TestplansApi updateTestPlan PUT /testplans/{id} Update the test plan with the specified ID
TestrunsApi addAttachmentToItem POST /testruns/{id}/attachments Add an existing attachment to the item with the specified ID
TestrunsApi addItemLink POST /testruns/{id}/links Create a new link for the item with the specified ID
TestrunsApi addTagToItem POST /testruns/{id}/tags Add an existing tag to the item with the specified ID
TestrunsApi deleteItemLink DELETE /testruns/{id}/links/{linkId} Delete the link with the specified ID
TestrunsApi deleteTestRun DELETE /testruns/{id} Delete the test run with the specified ID
TestrunsApi getActivities GET /testruns/{id}/activities Get all activities for the test run with the specified ID
TestrunsApi getAttachments GET /testruns/{id}/attachments Get all attachments for the item with the specified ID
TestrunsApi getDownstreamRelated GET /testruns/{id}/downstreamrelated Get all downstream related items for the test run with the specified ID
TestrunsApi getDownstreamRelationships GET /testruns/{id}/downstreamrelationships Get all downstream relationships for the test run with the specified ID
TestrunsApi getItemComments GET /testruns/{id}/comments Get all comments for the item with the specified ID
TestrunsApi getItemLinks GET /testruns/{id}/links Get all links for the item with the specified ID
TestrunsApi getLinkById GET /testruns/{id}/links/{linkId} Get the link with the specified ID
TestrunsApi getLock GET /testruns/{id}/lock Get the locked state, last locked date, and last locked by user for the item with the specified ID
TestrunsApi getTagOnItem GET /testruns/{id}/tags/{tagId} Get the tag with the specified ID
TestrunsApi getTagsOnItem GET /testruns/{id}/tags Get all tags for the item with the specified ID
TestrunsApi getTestRun GET /testruns/{id} Get the test run with the specified ID
TestrunsApi getTestRuns GET /testruns Search for test runs associated with test cases, test plans, an test cycles
TestrunsApi getUpstreamRelated GET /testruns/{id}/upstreamrelated Get all upstream related items for the test run with the specified ID
TestrunsApi getUpstreamRelationships GET /testruns/{id}/upstreamrelationships Get all upstream relationships for the test run with the specified ID
TestrunsApi getVersionOnItem5 GET /testruns/{id}/versions/{versionNum} Get the numbered version for the item with the specified ID
TestrunsApi getVersionedItem5 GET /testruns/{id}/versions/{versionNum}/versioneditem Get the snapshot of the test run at the specified version
TestrunsApi getVersionsOnItem5 GET /testruns/{id}/versions Get all versions for the item with the specified ID
TestrunsApi makeTestRunCurrent POST /testruns/{id}/updatedtestcase Delete the current test run and then create a new test run based on the latest test case version.
TestrunsApi patchTestRun PATCH /testruns/{id} Update the execution results for the test run with the specified ID
TestrunsApi removeAttachmentFromItem DELETE /testruns/{id}/attachments/{attachmentId} Remove an existing attachment from the item
TestrunsApi removeTagFromItem DELETE /testruns/{id}/tags/{tagId} Remove an existing tag from the item with the specified ID
TestrunsApi updateItemLink PUT /testruns/{id}/links/{linkId} Update the link with the specified ID
TestrunsApi updateLock PUT /testruns/{id}/lock Update the locked state of the item with the specified ID
TestrunsApi updateTestRun PUT /testruns/{id} Update the execution results for the test run with the specified ID
UsergroupsApi addUserGroup POST /usergroups Create a new user group
UsergroupsApi addUserToGroup POST /usergroups/{id}/users Add an existing user to the user group with the specified ID
UsergroupsApi deleteItem DELETE /usergroups/{id} Delete the user group with the specified ID
UsergroupsApi getGroup GET /usergroups/{id} Get the user group with the specified ID
UsergroupsApi getGroupUsers GET /usergroups/{id}/users Get all users for the user group with the specified ID
UsergroupsApi getUsers GET /usergroups Get all user groups
UsergroupsApi removeUserFromGroup DELETE /usergroups/{id}/users/{userId} Remove an existing user from the user group with the specified ID
UsergroupsApi updateUserGroup PUT /usergroups/{id} Update the user group with the specified ID
UsersApi addUser POST /users Create a new user
UsersApi getCurrentUser GET /users/current Gets the current user
UsersApi getFavoriteFiltersForCurrentUser GET /users/current/favoritefilters Gets the current user's favorite filters
UsersApi getUser GET /users/{userId} Get the user with the specified ID
UsersApi getUsers GET /users Get all users
UsersApi putUser PUT /users/{userId} Update the user with the specified ID
UsersApi setActiveStatus PUT /users/{userId}/active Update the active status for the user with the specified ID

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

basic

  • Type: HTTP basic authentication

oauth2

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes:
    • token_information: main scope for using Jama REST API

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author