search cancel

TDM API TDMModelService not working with CURL

book

Article ID: 131397

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

The TDMModelService call to Register RR Pair Objects cannot be called from CURL I keep getting a 415 Error in the TDMModelService.log when I try a cURL command.
Postman Works but cURL does not nor does SV App Test. 

Environment

TDM 
Test Data Manager API

Resolution

TDMModelService call to Register RR Pair  called from CURL

For Linux :

curl -X POST -k "https://{{TDMServer}}:{{TDMPort}}/TDMModelService/api/ca/v1/objects?projectId={{tdmProjID}}&versionId={{tdmProjVerID}} \ 
-H "Accept: application/json" \ 
-H "Authorization: {{tdmAuthorization}} \ 
-H "cache-control: no-cache" \ 
-F "body={\"objectName\": \"xml_rr_4\",\"objectType\": \"RRPAIR\",\"fileEncoding\": \"UTF-8\"};type=application/json;filename=blob" \ 
-F "[email protected]_Mixed.xml;type=text/xml;filename=fruit_Mixed.xml" \ 
-F "[email protected];type=text/xml;filename=TestNSDefaultingMixedContent.xml" 

For Windows:


curl -X POST -k -H 'Authorization: {{tdmAuthorization}}' 'https://{{TDMServer}}:{{TDMPort}}/TDMModelService/api/ca/v1/objects?projectId={{tdmProjID}}&versionId={{tdmProjVerID}}'
-H 'Accept: application/json'
-H 'cache-control: no-cache'
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' --form 'body={"objectName":"{{tdmObjID}}","objectType":"RRPAIR","fileEncoding":"UTF-8"};type=application/json'
-F [email protected]{{LISA_RELATIVE_PROJ_ROOT}}/Data/RR_From_SWAGGER/RR_SWAGGER01-req.txt
-F [email protected]{{LISA_RELATIVE_PROJ_ROOT}}/Data/RR_From_SWAGGER/RR_SWAGGER01-req.txt