This article describes how to use the Jama REST API to edit an item. This is very common in custom integrations, but can crop up in other applications as well.Before You Begin
This process assumes you have an application which can interact with the Jama REST API, and which can consume, edit, and generate JSON data. It also assumes that the edits you’re making are on items in a live project. If no users or other applications will be interacting with the items you’ll be editing, the ‘Lock’ and ‘Unlock’ steps can be omitted. Process
The basic workflow for editing an item in Jama using the REST API involves five (5) steps. Before you begin, you need the item’s ID so you can lock it. Since you intend to edit the item, you’ve probably already gotten its ID and stored it somewhere.
CAUTION: PUT’s definition requires that it create or replace a resource. Any data not supplied in the PUT request will not exist in the item after the PUT completes -- even if it existed before. The specification of PUT can be found at https://tools.ietf.org/html/rfc7231#section-4.3.4
Lock the item to be edited, otherwise there’s a small chance that someone can make changes to the item while you are editing it. If someone else has locked the item, your attempt to lock it may fail.2.
Now GET the item you just locked.
Copy and paste the “data” object into the PUT request and edit the “description” field.4.
When you make the put request the entire resource is replaced with this new data object.
Now unlock the item and the edit is complete.#REST