[closed] RTC - Creating Team Area using Rest API - HTTP Status 405
Hello!
I'm trying to create a Team Area using the REST API, according to DraftTeamProcessRestApi I should do a POST to "team-areas-url from a the Project Area Resource".
ex: https://jazzserver:9443/ccm/process/project-areas/_3fe54BJ5EeShucXs-2PcWw/team-areas
But I'm having a "HTTP 405 Method Not Allowed - The specified HTTP method is not allowed for the requested resource"
Maybe I misinterpreted or forgot something, but I really don't know why I'm having this error. I already tried multiple headers and values, but always same result. I even checked https://jazz.net/library/article/1086 (REST API creating a Project Area using perl) but I can't find the problem :(
Can someone help me with this? Thanks :)
Using: RTC 4.0.6, Firefox-RESTClient
Headers:
X-Jazz-CSRF-Prevent = DCB8645624FF90C9CB4A84182FFAC3E5
Content-Type = application/xml
Content:
<?xml version="1.0" encoding="UTF-8"?>
<jp06:team-area xmlns:jp06="http://jazz.net/xmlns/prod/jazz/process/0.6/" jp06:name="teamarearest">
<jp06:summary>Team Area Created via Rest</jp06:summary>
<jp06:description>team area</jp06:description>
<jp06:parent-url>https://jazzserver:9443/ccm/process/project-areas/_3fe54BJ5EeShucXs-2PcWw</jp06:parent-url>
<jp06:timeline-url>https://jazzserver:9443/ccm/process/project-areas/_3fe54BJ5EeShucXs-2PcWw/timelines/_3uSx9RJ5EeShucXs-2PcWw</jp06:timeline-url>
</jp06:team-area>
The question has been closed for the following reason: "Problem is not reproducible or outdated" by davidhoney Jun 13 '23, 4:33 a.m.
Accepted answer
This works as advertized. The question is very old.
Please read https://jazz.net/wiki/bin/view/Main/DraftTeamProcessRestApi#POST_team_areas_collection and https://jazz.net/library/article/1086 very carefully.
Please read https://jazz.net/wiki/bin/view/Main/DraftTeamProcessRestApi#POST_team_areas_collection and https://jazz.net/library/article/1086 very carefully.
To create a project area,
- Get the rootservices document
- Authenticate
- Get the projectAreas service URL e.g. https://elm.example.com:3443/ccm/process/project-areas
- POST to this URL, provide headers X-Jazz-CSRF-Prevent with he JSESSIONID cookie as value and Content-Type with value application/xml;charset=UTF-8
The issue with the question is to post to an existing project areas team areas service and not to the projectAreas service.
Comments
Chris Clark
Jun 13 '23, 4:31 a.m.Did you ever resolve this issue?
David Honey
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jun 13 '23, 4:33 a.m.Chris, please do not post follow on questions as answers to someone else's question, especially one that was 9 years ago. If you want to reask the question, or a follow up question, please post your own question. Thanks.