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
Ralph Schoon (63.4k●3●36●46)
| 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.
|
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
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.