cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I have developed an API in SAP API Management. When I tried to test the deployed API is not returning data as JSON, instead, it is returning HTML. What will be the issue?

Thanks,

Badhusha.

0 Likes
View Entire Topic
divyamary
Product and Topic Expert
Product and Topic Expert

Hi badhusha,

Looking at the error , it looks like you are not passing the required authentication to the target endpoint while accessing the API Proxy resource and therefore the target SAP Gateway system is triggering the SAML Request. While trying out the APIs from the resources tab, select the Add button next to the parameter and then select Header from the drop down. Specify the header name as Authorization and in the value for this header pass in your SAP Gateway credentials in Basic Authentication format .

Alternatively you can also test the API Proxy by navigating to the test console which is incorporated in the SAP API Management , refer help documentation

Thanks and Best Regards,

Divya

Badhusha
Participant
0 Likes

Hi Divya,

Thanks for your reply.

After I gave the Authorization Header, the javascript error went, but now the data is not coming.

1. Error in API Resources

I tried giving as "Basic XXXXXXXXXXXX " pattern

2. Error in API Test Console

3. Local Gateway system response

Gateway system response

Thanks,

Badhusha