cancel
Showing results for 
Search instead for 
Did you mean: 

Could not get the ApiHub resource data

Shishir_P
Explorer
0 Kudos
874

Hello Gurus,

 I have been trying to create Service using Api Accelerator Hub through BAS. Every time I try login via BAS to get access ApiHub I get an error "Could not get ApiHub Resource data.". I have logged in API Hub quite a few times to ensure that my credentials are right but so far I simply don't seem to get access through BAS.

Any pointers please....?

What do I need to do get this working? 

 

Screenshot 2024-07-03 at 17.51.48.png

rgovender
Explorer
0 Kudos
Hi, did you figure out what caused this problem? I've got it too.
View Entire Topic
john_c
Discoverer

Hi,

I don't know if you have solved it yet, but I'm having the same issue and I wanted to share a way around this problem.

The solution consists on creating a Destination in SAP BTP and consuming the Business Accelerator Hub API through it in BAS.

1. Access Business Accelerator Hub and search for the API you want to consume. In my case, I'm using Sales Order (A2X) as a demo.

image.png

2. Once in the API page, scroll down in the Overview tab to the API resources. There, click on Configuration Details. We will be using the links provided there. In my case, I'll copy the sandbox URL.

image.png3. Go to the Destination section of your SAP BTP subaccount. Here you have to creat a Destination for Business Accelerator Hub with the following configuration.

The property URL.headers.ApiKey will not appear as an option in the dropdown, you have to write it yourself. The value will be your Business Accelerator Hub Api key.

The URL will be "https://sandbox.api.sap.com" for sandbox.

image.png

4. We can now go to BAS and add the service in the Service Center. Instead of selecting the Business Accelerator Hub in the Provider selection, we will choose 'SAP SYSTEM'. There, our recently created destination will appear. If it doesn't show, refresh BAS.

image.png

 5. We select the apihub_sandbox service. In the Service Path Input, we have to copy the half of the API URL that we left behind when we created the Destination.

  • The part we used for the destination: https://sandbox.api.sap.com 
  • Our API URL: /s4hanacloud/sap/opu/odata4/sap/api_salesorder/srvd_a2x/sap/salesorder/0001

After clicking on Connect, the Add to Project button should be displayed and the API content should appear below the Connect button. After that, we can add the service to our project.

image.png

 I hope that you find this useful.

Kind Regards

JannisC
Discoverer
0 Kudos
Thank you this worked for me!