Noobs: PLEASE DO'T MAKE MY MISTAKE

I’m building my app in WeWeb + Xano, and I wanted to share a big mistake I made in hopes that other noobs will be able to avoid this pain. I recently thought it would be a good idea to organize all my Xano APIs into folders so that I didn’t just have a big Default API folder with dozens of APIs inside it. So I did that. Then the next time I tried to log into my weweb app as a user, it didn’t work. In fact, my whole app was broken. It turns out that every single collection in WeWeb was broken because the path to each API had changed. I’m trying to work with Xano support to get a backup of my workspace from before I moved all those APIs. If I. can’t get that, I’ll have to go through every single collection and redefine them. Arg…

1 Like

Xano stuff :eyes:

@fredo22 I made the same mistake a while back, but luckily only for one or two APIs. I feel your pain brother. :disappointed_relieved:

Yep, been then albeit on a smaller scale. A good thing to callout so others don’t fall into the same trap.

I’ve conceded that some of my early ‘disorganization’ is just debt to carry over the short term.

It would be ideal if you could ‘bind’ the endpoint in the Collection configuration (instead of selecting from dropdown options) and then configure the endpoint url similar the REST API request. @Joyce demonstrated a good practice of creating a variable ‘base_url’ to bind to the path - this way, your Xano group base url can be changed with little updating on the frontend.

1 Like

can you share the tutorial ?

@liam_putra at 11:20 min this is where Joyce is using a baseURL when configuring a collection using REST API.

1 Like

UPDATE: I decided to move all of my APIs back to the original (DEFAULT) folder, and that fixed 90% of what was broken. A few collections still weren’t working, and when I investigated my bindings, I noticed that as a result of my moving APIs, WeWeb had added some additional characters to the formula. I can’t remember the exact format of those added characters (cause I’ve since deleted them). For example, if the binding was to a collection called Teams, the formula was changed to “{teams} [data][id]”. After I deleted those additional characters, then the collections worked again, and I could breathe easier!

2 Likes

Yeah, I’m not a fan of how Xano allows for organizing the APIs. I don’t necessarily want the path to change, but perhaps just the folder for visualizing an organized number of APIs.

Thanks for sharing regarding how it impacts WeWeb.

3 Likes