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

REST API to create Work Item in RTC

 Hi team,


I am using Postman as a Rest Client and I want to create Work Item in RTC using Rest API. Please help for the same

0 votes



2 answers

Permanent link

 Hello,


I believe the links here answers your question:


0 votes


Permanent link

From there you get what you need. The sequence looks like this:

Catalog (Project Areas)
Request GET https://elm.example.com:9443/ccm/oslc/workitems/catalog
Project Area service descriptor for one project area
Get creation Factory for the type
Resource Shape for the work item type of one project area
Request GET https://elm.example.com:9443/ccm/oslc/context/_8e5qfFpmEeukW7cqqDjAuA/shapes/workitems/
Resource Shape defines available attributes and the allowed values for attributes
Get details for complex values (Category, Target, Enumerations) following the links
Example Category “unassigned” see "dcterms:title": "Unassigned"
Request GET https: //elm.example.com:9443/ccm/resource/itemOid/com.ibm.team.workitem.Category/_8s97oVpmEeukW7cqqDjAuA

Compose the Request body with the attributes needed for the work item and post
Request POST https://elm.example.com:9443/ccm/oslc/contexts/_8e5qfFpmEeukW7cqqDjAuA/workitems/defect
Body:
{"dcterms:title": "Work Item Created from JSON in Python.", "dcterms:description": "This is a work item linking to <a href=\"https://jazz.net/\">Jazz.net</a>.", "rtc_cm:filedAgainst": {"rdf:resource": "https://elm.example.com:9443/ccm/resource/itemOid/com.ibm.team.workitem.Category/_HWNLMFpnEeukW7cqqDjAuA", "rdf:type": [{"rdf:resource": "http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/Category"}]}}

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
× 7,577
× 1,407

Question asked: Jun 16 '21, 3:39 a.m.

Question was seen: 3,474 times

Last updated: Jun 16 '21, 9:35 a.m.

Confirmation Cancel Confirm