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

How to get ID of a work item which was just created by USING RESTI API?

 

Hi Someone who may concern,

     We are working on using REST API to create a new work item. And we need to know the id of this work item after the work item is created, and use it to update our patch commit information.
     However, we noticed there is no ID information in the response xml we got from RTC after creating work item. It only indicated the work item is created successfully.

     We are wondering how can we get that?

      Thanks!

Best Regards,
Jane Zhou

0 votes



One answer

Permanent link

In most cases, when a creation operation (POST) is successful, and you get an HTTP 201 code, the response header "Content-Location" contains the URI or ID of the new resource.

0 votes

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
× 12,020

Question asked: Jan 02 '18, 1:28 p.m.

Question was seen: 1,727 times

Last updated: Jan 02 '18, 7:40 p.m.

Confirmation Cancel Confirm