Can the Bubble API Connector consume the Bubble API’s Swagger output in any meaningful way?
Can’t seem to get it to recognise the objects as a list.
Can the Bubble API Connector consume the Bubble API’s Swagger output in any meaningful way?
Can’t seem to get it to recognise the objects as a list.
do you mean as a get? GET https://yourapp.bubbleapps.io/api/1.1/meta/swagger.json
Yes, I can GET it without issue.
But then the API connector won’t iterate on the objects.
It would be very nice if you could get a list of your tables this way.
Tried flattening it, but that isn’t recognised either.
you can GET: https://yourapp.bubbleapps.io/api/1.1/meta up the top (get) returns the list of data types, despite not showing as a list it will actually produce the list when referenced, then each object is below for the taking, as a list of id, display & type. i’m not sure if this is what you have already gone down this path but it could have some uses depending on what your trying to achieve.
Aha, brilliant. I had thought this was deprecated.
Yes, had tried this route before, but I think the API connector has come along since then.
It still won’t work dynamically, as the Bubble Table is included in the field name, rather than as part of an array.
However … I reckon if I can convert the JSON to JS Array I might be able to get there. Can probably do it by wrapping the API call in another call using some Node.js. But would prefer to do it in Bubble.
Have a virtual pint on me
Well, that is quite hard to do. Converting to JSON arrays doesn’t work either.
What you need to do is pull out the parts of the JSON that you want, then Bubble will recognise the array.
For the time being I am wrapping the /meta/ call in a webtask service and doing some manipulation.
Being able to do it within bubble would be very helpful.