API question
Options
![Mr_English](https://us.v-cdn.net/6037124/user_avatars/1271230.jpg)
Mr_English
Member ✭
I have a table called Settings. There is one record per user. I want to get the record by user_id.
When I attempted to create the API endpoint of settings/{user_id} I got an error message "This name is already being used by another query". I can't see another API url like that. Any suggestions?
[image.png]
[image.png]
When I attempted to create the API endpoint of settings/{user_id} I got an error message "This name is already being used by another query". I can't see another API url like that. Any suggestions?
[image.png]
[image.png]
Comments
-
,
You are getting that error because you have a variable in your URL.
settings/{user_id}
That is the equivalent to a wildcard - settings/*
So if you had another api endpoint titled settings/stuff, then there would be a conflict since the API wouldn't know which endpoint to route to.
The easiest fix would be to just change settings/{user_id} to settings2/{user_id}
Anything that has a prefix that doesn't conflict with something already there. -
Thanks
Got it working as you suggested.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback