It's all about the answers!

Ask a question

REST API Create components and streams


Gabriel Garcia (111) | asked Oct 12 '23, 7:38 p.m.

  Hello Jazz community. 


I have a special requirement. I need Create a component with a stream in a specific project area. 
I mean: 
- First create a project area.
- Second create a component.
- and last create a stream. 

It's possible to do whit REST API? 
Or somebody has some example to do this? 

Thanks in advance. 

2 answers



permanent link
Ralph Schoon (63.2k33646) | answered Oct 13 '23, 2:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 This would require multiple APIs. E.g. creating a project area is not part of the reportable REST API and also not part of the OSLC API.

You can find the list of supported ELM APIs here: https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding


permanent link
Gabriel Garcia (111) | answered Oct 13 '23, 5:55 p.m.

Hello again I'm trying to create the component. 


Here is my code, but is not working the response = 405.

Could you give other advice?? 

Project area id = _2asdsdknf+asdkm
headers =  {'OSLC-Core-Version': '2.0',
          'Accept': 'application/xml',
           'Content-Type': 'application/rdf+xml'}

components_url = 'https://jazz.server/rm/cm/resources/_2asdsdknf+asdkm/components'

            new_component = '''<component>
                    <dc:title>Component new</dc:title>
                    <rm:project rdf:resource="https:\/\/jjazz.server\/rm\/cm\/resources\/_2asdsdknf+asdkm" />
                </component>
            '''

            response =request.post(components_url, data=new_component, headers=headers, auth=("user','password)')

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.