How to make a post request to Requirements Management DOORS Next Gen with OSLC
I'm getting an error when trying to make a most to RM DOORS Next, Version 7.0.2 with OSLC API. The error I'm getting is ">com.ibm.rdm.fronting.server.exception.MethodNotAllowedException
One answer
Heres' my approach:
STATUS : 405
Comments
- You do a GET and not a POST
- Use application/rdf+xml and not Application/xml+rdf
- You can't GET a factory
- You should GET a resource shape to understand what the POST body should contain.
I ran this with the commandline:
1 vote
Thanks for your response Ian. For the "Configuration-Context" what exsctly is the url there? just jazz.com/rm?
To use the OSLC APIs you'll need to specify a configuration (using parameter oslc_config.context or header Configuration.Context - Note the . not an _) - the configuration URL could be found manually using Share Link To Artifact in the config, or programmatically by discovery looking for the configuration name - for an example of this see https://jazz.net/forum/questions/266334/dng-oslcfetch-components-from-project-area
Ian,
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 15 '23, 3:15 a.m.If you think the readers of your question will compose the request and then answer, think twice. Provide the URI, the headers, the content of the post you did etc.
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 15 '23, 4:02 a.m.To use the OSLC APIs you'll need to specify a configuration (using parameter oslc_config.context or header Configuration.Context) and always provide headers OSLC-Core-Version: 2.0, for post/put provide Content-Type: application/rdf+xml, for get provide Accept: application/rdf+xml.
Philip Gates
Feb 22 '23, 5:41 p.m.Thanks for your response Ian. For the "Configuration-Context" what exsctly is the url there? just jazz.com/rm?
David Honey
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 23 '23, 12:52 p.m.The URI of a configuration.