cancel
Showing results for 
Search instead for 
Did you mean: 

OData API as Destination in HCP

Bhaskar_Tripath
Participant
0 Kudos
984

Hello,

I am trying to use Odata API provided in SAP API Business Hub to configure a destination in HCP trial account. But I am getting error when I check connection. However, when I use an independent tool to access API, it doesn't even require any authentication account.

Error:

Same error when I user "No Authentication".

Where am I going wrong?

BR,

Bhaskar

Bhaskar_Tripath
Participant
0 Kudos

bjoernw Can you please advice on this?

Accepted Solutions (0)

Answers (3)

Answers (3)

diego_perego
Associate
Associate
0 Kudos

Hi Bhaskar, did you manage to make it work? I'm facing the same issue...

Thanks

Bhaskar_Tripath
Participant

Hi Diego,

No, it seems like it is not supported yet. What I have done for now is to make http request call directly in the application component. That way I am getting response all okay 🙂

BR,

Bhaskar

Elijah_Martinez
Product and Topic Expert
Product and Topic Expert
0 Kudos

Just as an FYI, the "Peer not authenticated" from destinations error is simply that, a login check from Destinations. I have been told that it does not matter and the destination will work.

Regards,
Elijah

gauravdey
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bhaskar,

Can you try adding a new property as <TrustAll> and value as <true> and then check.

Regards,

Gaurav Dey

Bhaskar_Tripath
Participant
0 Kudos

Hi Gaurav,

Still not working.

Best Regards,

Bhaskar

gauravdey
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bhaskar,

After creating the destination try to use it in WebIde.

Regards,

Gaurav Dey

Elijah_Martinez
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bhaskar,

In your destination you are passing credentials, however credentials are not needed. Try setting the Authentication to None and try again.

(Please note also that the full request hits /User making the full URL https://apihub.hanatrial.ondemand.com/odata/v2/User/User , don't ask me why...)

I hope this helps you.

Regards,
Elijah

Bhaskar_Tripath
Participant
0 Kudos

I should have mentioned this, but I tried /User/User too based on the sample code available in API hub. Plus, I also tried no authentication. Still same error 'Peer Not Authenticated'. Whats interesting is if I call through Postman, it returns the result even with authentication, as if it just ignores the credentials.

Best Regards,

Bhaskar

Elijah_Martinez
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bhaskar,

You have caught me in one of those rare moments where I am sure that something should work but I have not actually tried it myself. Which always blows up in my face. Let me go back and see if I can wrestle with making this destination concept work for me, and I will then try to help more 🙂

Regards,
Elijah

Bhaskar_Tripath
Participant
0 Kudos

If you can get this working, I'll owe you a big thank. It feels frustrating why such an open Odata service should have any authentication error.

Also, the other way I am trying to get around is by directly calling the service from "Component.js" in my app. I do get the data there, but still trying to figure how to setup meta data at design time to enable binding to view elements (I might sounds stupid here as I am still beginning to learn web technologies. I guess I miss the simplicity of ABAP 😞 But still positive 🙂 )

Best Regards,

Bhaskar

Elijah_Martinez
Product and Topic Expert
Product and Topic Expert

Hi Bhaskar,

I was hoping there was a simple way to do this, but it sounds like you've already figured out the appropriate path towards this.

I believe you will want to follow the tutorial we have on the SAP Developer center:

http://www.sap.com/developer/tutorials/hcp-abh-api-ui5-app.html

(the PreReq steps are here, though you may have already done all these steps
http://www.sap.com/developer/tutorials/hcp-abh-getting-started.html
http://www.sap.com/developer/tutorials/hcp-abh-test-locally.html )

I'm not entirely sure about the reason for the authentication issue with the destination, it may be the requirement for an API Key, though it's not clear why POSTMAN works. But hopefeully with this you can bypass this approach.

Regards,
Elijah

Bhaskar_Tripath
Participant
0 Kudos

Thank you so much Elijah. The post is a good find!

BR,

Bhaskar