Test via POSTMAN REST services for POST
I am trying to test via POSTMAN the REST call from D2SV-Client2Server-Logging (D2-Smartview/clientlog using the POST method) but I get the error below
{ "status": 415, "code": "E_UNSUPPORTED_MEDIA_TYPE", "message": "The specified media type application/json;charset=UTF-8 is not supported. Supported media types: [application/vnd.documentum.d2.v1+json, application/vnd.emc.documentum+json, application/json, application/home+json, application/hal+json, application/vnd.documentum.d2.v1+xml, application/vnd.emc.documentum+xml, application/atom+xml, application/xml, application/home+xml].", "details": "", "id": "b68bba83-15a4-406e-8976-e5a238e24c9f"}
The same error (when testing the POST verb) I get when testing the D2 REST created from the Assistant. I have tried adding application/json;charset=UTF-8 in the "consumes" and "produces" (in the controller) but also in the "Content-Type" and "accept" in Postman. FYI, I am using the /clientlog as a sample, I actually want my own call (created via the Assistant) to work correctly.
Answers
-
@Lucian Stanus : you need to set the content-type as either of those mentioned in the request header.
so for example you can set as Content-Type as application/json
0 -
@Antony Nalkara I have already tried that the other day and it didn't work. If you have the possibility, could you please test the only POST call frorm the D2SV-Client2Server-Logging sample? Or a new service create with the Assistant ? Maybe even with the body sample?
0 -
@Antony Nalkara were you able to test the OOTB REST call (using POST) created via the Assistant ? Thank you !
0 -
@Lucian Stanus : Sorry for the late response…yes so i did try the same API in D2SV-Client2Server-Logging sample.. so i was able to run it… here are a couple of screen shots of my headers as well as the body of the POST call that I fired.
Request headers
POST request body
0 -
It looks like you're encountering a media type issue with your POST request in Postman. Make sure to set the "Content-Type" header to one of the supported media types listed in the error message, such as
application/vnd.documentum.d2.v1+json
application/json
. Also, check if your API endpoint is configured to accept the media type you're specifying. If you're still having trouble, consider reviewing the API documentation for any additional requirements. Good luck!
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 149 General Questions
- 148 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories