How to post Test cases / Test suites from QM Rest Api
One answer
Have you reviewed the information on https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding, especially the links to ETM REST APIs?
You might also want to look at the OSLC Primer.
Comments
I am currently trying this curl command to upload a test case via rest api
curl -X POST -k -H "Authorization: Basic cGFibG8uZ2FyaWpvOlBhbGFmb3g5" -H "oslc-core-version: 2.0" -H "Accept: application/rdf+xml" -H "Accept: application/xml" -i "https://doorsng.grupoantolin.com:9443/qm" -H "configuration-context: https://doorsng.grupoantolin.com:9443/qm/cm/stream/_UTSfAAdOEe2HeIm2C2mPgQ" -F "file=FILE.xml" --cookie "cookie.txt"
But I am getting error HTTP/1.1 302 Found
Your POST request is to "https://doorsng.grupoantolin.com:9443/qm". That looks like the context root of an ETM instance, and not the URI of a public REST service in ETM.
This means that you are redirected to a form based authentication. See https://rsjazz.wordpress.com/2021/10/15/elm-authentication/
Authentication can be a challenge. If you can use RESTClient in Firefox. That allows to access the web page, authenticate and then use RESTClient to GET/PUT/POST and the authentication is already done. It is also possible to use POSTMAN, but then you need an additional call for the Form based auth.
What is supported depends on the server setup. Basic Auth us only fallback for JAS.
https://jazz.net/wiki/bin/view/Deployment/CreateCustomScenarios#Using_Curl_Script shows how to use cURL and Form Based Auth.
What is supported depends on the server setup. Basic Auth us only fallback for JAS.
https://jazz.net/wiki/bin/view/Deployment/CreateCustomScenarios#Using_Curl_Script shows how to use cURL and Form Based Auth.