Skip to Content
0

OData API as Destination in HCP

Feb 10, 2017 at 07:12 AM

484

avatar image

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

10 |10000 characters needed characters left characters exceeded

@bjoernw Can you please advice on this?

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Elijah Martinez
Feb 22, 2017 at 06:22 AM
0

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

Show 5 Share
10 |10000 characters needed characters left characters exceeded

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

0

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

0

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

0

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

2

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

BR,

Bhaskar

0
Gaurav Dey
Feb 24, 2017 at 11:02 AM
0

Hi Bhaskar,

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

Regards,

Gaurav Dey

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Gaurav,

Still not working.

Best Regards,

Bhaskar

0

Hi Bhaskar,

After creating the destination try to use it in WebIde.

Regards,

Gaurav Dey

0
DIEGO PEREGO
Mar 28, 2017 at 10:09 AM
0

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

Thanks

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

1

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

0