Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Is it possible to change iteration data through REST API?

Hi!

We have an RSA extension that uses the Rest API to synchronize with an RTC project area (RTC 3.0) . Getting and updating ordinary work items like defects works as expected. For iterations it possible to do a GET request to get data from an iteration, for example like this:

https://localhost:9443/ccm/oslc/iterations/_dyM1gEsYEeG_mqkOQUVnDA

However, trying to do a PUT request to replace some of the values we get a 405 Method Not Allowed Response. Now we are trying to find out if we just have made any faults in our request, or if it simply is not possible.

Should it be possible to update iteration date like start/end-date through the REST API?

with best regards Erik

0 votes



3 answers

Permanent link
These are currently only in DRAFT form and for internal use only, you can see the reference on the wiki.

https://jazz.net/wiki/bin/view/Main/ProcessMain

-Sean

0 votes


Permanent link
We don't support modify (PUT/DELETE/POST) iteration through REST API. We only support GET iteration.

https://jazz.net/wiki/bin/view/Main/DraftTeamProcessRestApi

0 votes


Permanent link
Thanks!

We managed to change the iteration data through the Java API

br Erik

0 votes

Comments

can you send me an example?

Has been on vacation, but the following lines could give you some clues. It is actually quite straightforward when you have a valid ITeamRepository reference. Then you can fetch the wanted project area and from that timelines and from that iterations, and then you can do whatever you want with them.

br Erik

        processItemService =(IProcessItemService)teamRepository.getClientLibrary(IProcessItemService.class);

...

private void updateIteration(IIteration iteration, String id, String name, Date startDate, Date endDate) throws RTCException{

  try{



     Date date = iteration.getEndDate();

     IIteration iterationCopy =
        (IIteration)processItemService.getMutableCopy(iteration);

     iterationCopy.setEndDate(endDate);
     iterationCopy.setStartDate(startDate);
     iterationCopy.setName(name);
     IProcessItem[] itemsToSave =
        new IProcessItem[]{iterationCopy};
     IProcessItem[] savedItems =
        processItemService.save(itemsToSave, new NullProgressMonitor()); 
  }
  catch (Exception e){

    <something>
  }

}

Hmmm, the formatting above became quite lousy, seems that line breaks are ignored :-(

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,927

Question asked: Jan 30 '12, 4:37 a.m.

Question was seen: 7,195 times

Last updated: Aug 16 '12, 2:10 a.m.

Confirmation Cancel Confirm