Creating a new work item (Program Epic) API
![](http://jazz.net/_images/myphoto/c7360cc1acacad685c6dfba0e6571e87.jpg)
I am trying to find the API that involves creating a new work item (specifically a program epic).
I found this resource: https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Creating_Work_Items
However, in regards to the work item representation ("create-simple.json"), is there documentation on what the fields are? Like setting the type of work item, summary, description of work item, electrical architecture, ...?
I couldn't find specific documentation that details this.
Additionally, is it required for the POST request to contain binary data from a .json file or can we just do a POST request with direct JSON data?
Accepted answer
![](http://jazz.net/_images/myphoto/c7360cc1acacad685c6dfba0e6571e87.jpg)
Please follow https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20 instead. It links back to the link you are using and the discovery section in the old one is nicer. You might also want to search for the OSLC workshop, starting here: https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding
The headers are very important and mostly define what you get and how it is represented.
Quick summary:
- If you discover the services, there is a link to a resource shape for each work item type. This link proivdes the data (or links to it) for the available attributes and the allowed values.
-
You POST the JSON data in the body, usually UTF-8 encoded
To get all the data to actually do a POST using complex attributes requires about 7 or more calls. I would suggest you use a test project area and switch off the required attributes for your first steps. As far as I know, you can not get the required attributes, you need to know them.
Neddless to say, you should get a work item using its URI first to understand how the data looks like.
Comments
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
You might want to use RESTCLIENT or POSTMAN for your exploration. https://rsjazz.wordpress.com/2019/05/13/using-a-rest-client-to-authenticate-to-elm-clm-applications/ could be useful.