Forum Academy Marketplace Showcase Pricing Features

Problem with API response body

Hi Everybody,

I’m trying to create and connect to VEEAM API. When using online API testing services or other online programs the body of API response returns the data:

However after creating API call within Bubble:

The result returns empty body list as on below example:

The result is the same in all possible API call configurations.

Any ideas what am I doing wrong?

Dominik

I think you want to set the response to XML, right?

06%20PM

Actually I did. I didn’t help. The result was always the same…

If you can get this working in Postman, then you could post the working parameters and we can help you translate that into a Bubble call.

It is working fine in Postman:

In Bubble only correct API header is returned - the body (list of links) is empty.

The problem is that all the information you are interested in, is in attributes of the xml tags, it looks like Bubble’s xml parser is looking for data between start and end tags.

Some options to go forward …

  • Raise a discussion with Bubble, see if they can improve the parser to look at tag attributes.

  • Receive as type “Text” instead of XML, and do your own parsing.

  • Use an intermediary server to translate the XML to something else that Bubble can parse.

Thanks moshav for the suggestions. I already went through all the options and it looks for me there is something wrong with the API engine itself.
After changing type to “Text” the following is received:

It looks for me that API engine is not reading body of the message at all. Maybe someone from Bubble could help to solve this problem.

Of course there is always a way to use an intermediary server but it is a workaround rather than solution of the problem.

What about the API, does it have the ability to send in another format?

To try this, on the request, add the header Accept=application/json

Same thing… empty body.

hi @dominik,

The API Connector is a bit demented, when the response type is selected as Text it doesn’t show the response on the preview.

If you have Capture Headers turned on as you do, you can get the body as a text object in api’s body.

If you don’t have Capture Headers turned on, the body returns as a text.

Give it a try from a workflow.

Hi @mishav,

Thank you for your suggestion. Actually it works!!.
Now I have to convert this text back to the list of links… or search each time for appropriate link.
It will be more complicated then xml result but at least it something.

Thanks for your help!

1 Like

I came across the exact same issue and reported it as a bug, they’ve pushed a fix for it now. Yet to test it properly but it seems it’s working as expected.

image