It's all about the answers!

Ask a question

How to create a Task WorkItem using OSLC 2.0


Chandan M B (11314184) | asked Apr 16 '15, 2:46 a.m.
Hi,
I need to create a new Task using Java. Should i use POST/PUT and can you provide me syntax of url format and body to create a Task Work Item.
Sample code helps me a lot :)

Regards
Chandan

One answer



permanent link
Karthik Krishnan (8899123165) | answered Apr 16 '15, 8:35 a.m.
With Java you may also use the RTC Java API to manipulate work items

With OSLC refer - https://jazz.net/forum/questions/124269/resolved-create-work-task-work-item-via-oslc

With Java API --> Refer this blog https://rsjazz.wordpress.com/ by @ralphschoon  You will find lots of examples

Comments
Chandan M B commented Apr 16 '15, 11:08 p.m.

Hi Karthik,

I tried using Rest Client.
URL : https://localhost:9443/ccm/oslc/contexts/_7zrIUNj9EeS7ButJuJdZ2w/workitems/task


Added the Headers.
I did PUT
Its not working.

405 Method Not Allowed



Donald Nong commented Apr 17 '15, 4:44 a.m.

To avoid the "405 Method not allowed" error, you need to add a proper "Accept" header.

Your answer


Register or 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.