Skip to Content
author's profile photo Former Member
Former Member

Getting error: 415 Unsupported Media Type while going through the Data Hub Trail

Hi,

I'm following the Data Hub trial at the URL:

https://wiki.hybris.com/display/tr52/hybris+5+Developer+Training+Trails+-+Import%2C+Compose%2C+and+Publish+Data+Using+the+Data+Hub+-+Step+3?focusedCommentId=257601850#comment-257601850

and got stuck trying to load raw data by posting the message to the following endpoint:

http://localhost:8080/datahub-webapp/v1/data-feeds/DEFAULT_FEED/items/RawApparelCategory

I applied the headers: Content-Type : application/octet-stream x-tenantId : single

Even with all these settings, I still got the error: 415 Unsupported Media Type

Wondering if theres something I missed?

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 30, 2014 at 01:19 AM

    Yep, thats what I'm experiencing too. That setting is defaulted to "Text" for all my requests that have been failing and even changing it to something else doesn't change the 415 error message.

    I'm using the Postman app running on Chrome. Is there a different version?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 29, 2014 at 09:54 PM

    It could be the case that your Accept: header is set to application/octet-stream. Add Accept: application/xml and see if that helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 29, 2014 at 10:39 PM

    Thanks for replying Rafal. I tried setting the Accept header to application/xml, application/json, text/plain and they all still came back with the 415 error.

    Any other suggestions?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 29, 2014 at 11:00 PM

    If you are using postman, make sure that the little drop-down selection to the right of [..|raw|binary] is set to 'Text'.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.