ugofranklyn25
Novice

Error 400 when passing Content-Type to header in Rest API

Hi,
So I am implementing a new rest API into my process, I have created and configured the swagger discriptor, however when I pass just the Authorization into the header, I get error 415. If I try to pass in the content-type as another header parameter I get error 400.
Can anyone help out and explain to me what I am doing wrong.
Thanks.
0 Kudos
Reply
1 Reply
Widson
Apprentice

Re: Error 400 when passing Content-Type to header in Rest API

Hi  @ugofranklyn25;


 


Q1:-If I try to pass in the content-type as another header parameter I get error 400- Could you please clear your browser cache ,This is most probably caused by having too many cookies in the header during a request to K2 Trust. It's common when using the same browser session to access many sites that each start adding to the cookies in the browser session.


---Test using different browsers to see if the problem persists.


 


Q2:-As for this query "when I pass just the Authorization into the header, I get error 415", it could be due to unsupported Swagger files for integrating with a number of different services, search here for supported versions(https://community.k2.com/t5/Swagger-Templates/bg-p/SwaggerTemplates).


 


-Additionally:-Review this file reference format topic carefully while planning your REST service integration to learn about potential limitations of the Swagger format that can impact the feasibility of this approach. An alternative (if the REST broker cannot be used to integrate with the service) is to write a custom broker to handle things like dynamic field names, field names with numbers, and OAuth 1.0-based services.


Refferenced(https://help.k2.com/kb001786).


 


Hope your issue will get resolved!


 


Regards:


Widson.

0 Kudos
Reply