cancel
Showing results for 
Search instead for 
Did you mean: 

SAP API Management : Resources not returning JSON

02-18-2020 9:35 AM
Badhusha Participant
1674 views 4 comments
0 Likes
SAP Managed Tags
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

Accepted Solutions (0)

Answers (2)

Answers (2)

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

manoj_khavatkopp
Active Contributor

Hi Badusha,

Have to tried to test the backend API standalone with Postman , looks like the issue is with backend API and not the Proxy/resource you have created in api managment.

Thanks,

Manoj

Badhusha
Participant
0 Likes

What does the backend API standalone means?

Looks like it is working fine. Can you please be more clear where you are mentioning ?