search cancel

PAPI / assets / SOAP / file doesn't have .wsdl, .xsd, .json, or .wadl extension when using postman


Article ID: 202484


Updated On:


CA API Developer Portal


Unable to add a assets  to a API using PAPI calls from postman .

when sending the an request from postman PAPI  to /api-management/1.0/apis/{uuidAPI}/assets

It fails with  

"userErrorMessage": "The request could not be completed due to data input errors.",          

"error": "File doesn't have .wsdl, .xsd, .json, or .wadl extension",              

"key": "File doesn't have .wsdl, .xsd, .json, or .wadl extension"         

 The file we try to upload has the right extension and is correct as it can be uploaded with curl or in the Portal GUI.


Release : 4.5

Component : API PORTAL


The problem is the body in  postman  

If we  look what curl sends

curl -i -X POST -H "Content-Type:multipart/form-data" -H "Origin:https://apim.portaldomain" -H "Authorization: Bearer 8a5b4912-8df1-4bbd-9c8e-f9f10e5e90ba" -F "[email protected]\"./api.wsdl\";filename=\"api.wsdl\"" 'https://apim-ssg.portaldomain:9443/tenantname/api-management/1.0/apis/ff894666-0ad9-404c-8be3-7cdddd23b249/assets ' -k -v --trace test.txt

The trace shows we send

Content-Disposition: form-data; name="files"; filename="api.wsdl"..Content-Type: application/octet-stream.... and  filename (type=text) sendEncaissement.wsdl Content-Disposition/form-data

So after adding in the postman  request body for the following API 


files (type=file) api.wsdl application/octet-stream (this is the file you select in postman to upload)

filename (type=text) sendEncaissement.wsdl Content-Disposition/form-data

The asset can be added without error.