415 Unsupported_media_type error when registering file object in TDM Portal
search cancel

415 Unsupported_media_type error when registering file object in TDM Portal

book

Article ID: 137299

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

Going through instructions found here: 
https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/continuous-testing/test-data-management/4-9/reference/rest-api-reference/use-apis-to-register-and-publish-csv-files.html

Using the document above (Register a file object) and are unable to register any file in a TDM portal. 
Getting "Unsupported Media Type" errors. 
Tried both XML and CSV files being uploaded via Postman to from local machine to portal.  Getting below error:


 "415 UNSUPPORTED_MEDIA_TYPE",
    "errorMsg": "Server encountered an error processing the request. See server logs for more details",
    "errorDetail": "",
    "timestamp": "2020-05-07T15:00+0000"
}


 

Environment

TDM Portal API
Test Data Manager

Cause

"Unsupported media type" error message is generated because Content Type is missing from the body.

Resolution

Set the Key name to file and changed the content type (this option is hidden by default in Postman) for the body key to be application/json (make sure you set the checkboxes for file and body to true)

Additional Information

https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?MessageKey=9abb4441-c48a-4bc6-b0df-c23eca29cbf5&CommunityKey=909e0526-d8ad-455d-97eb-aa009df5d3aa&tab=digestviewer#bm9abb4441-c48a-4bc6-b0df-c23eca29cbf5