REST API Create components and streams
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
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
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)')