[New Feature] API Connector plugin - ability to add fields not returned in initial API call

Hi @marca the button to (enter manually) is not always visible for me, is that normal?

Hello,

That’s a nice feature! But how can one’s populate the new fields added to the API call response (since the idea is to add info from another source)?

Paste in the sample JSON response having clicked “Manually enter response”.

Thank you Nigel,

I’m must be missing something.
Let’s take this simple example:
I do a “Get https://api.thecatapi.com/v1/images/search” via the API connector.
Default response is:

{
“id”: “7d9”,
“url”: “https://cdn2.thecatapi.com/images/7d9.jpg”,
“width”: 500,
“height”: 332
}

Now, let’s say I want to add one field “color”, I have tried to edit the model of the response by clicking “Manually enter response”, so to get:

{
“id”: “7d9”,
“url”: “https://cdn2.thecatapi.com/images/7d9.jpg”,
“width”: 500,
“height”: 332,
“color”: “grey”
}

Now I have two issues:

  1. I get an error “An error occurred trying to evaluate this property” when I try to use the API response in my workflow (it happens only when I change the response model)
  2. How can I change the color value from sample value (“grey”) to the actual value (say, “black”). Can I use the value stored in a custom state and update the modified API call response with this value?

My problem is simple, I want to add an info that the original API response doesn’t have (but that I get elsewhere or compute on my side). Can I achieve this?

Thank you.

Not really. You should read that data as part of the workflow.

I mean … yes you can. You can recreate the API with the fields and then pass them back out via some script and then read them back in and get Bubble to Parse it. But that is a LONG way round.

Why do you need the “colour” in the API?

Hello Nigel,

Thank you for your answer.

I have an object with plenty of information that contains several list of objects, themselves containing multiple fields, etc. I’m able to work fine with this data, which I want to save in database only later in my workflow, so I’m working with the JSON object (and it’s ok). However, I’m missing a few fields for the nested objects that I have on my side or am able to infer/compute. I find very painful to “use” this additional fields in conjunction with the initial nested object for each operation where I need it.

So I was looking to append this new data to the original object once, and work with this modified single object for all subsequent actions to spare the hassle.

But maybe what I’m trying to do doesn’t make sense?