Back

localhost error

  • 1
  • Self Hosted
  • Flutter
  • Databases
pitchar
20 Oct, 2023, 08:17

becaause this is the error when i try to access it {"message":"The requested route was not found. Please refer to the API docs and try again.","code":404,"type":"general_route_not_found","version":"1.4.5"}

TL;DR
The user is experiencing an error when trying to access the "/v1" endpoint on localhost. The error message states that the requested route was not found and provides a 404 error code. Other users in the thread suggest that the endpoint "/v1" is not designed to provide any data and that specific endpoints like "/v1/databases/{databaseId}/collections/{collectionId}/documents" should be used instead. The user is advised to refer to the documentation for more information on accessing databases and getting data through different endpoints. A link to Flutter documentation is also provided. There doesn't seem to be a clear solution mentioned in the thread
Ryan
20 Oct, 2023, 08:19

The endpoint /v1 is not used itself but all of the endpoints that are in use all have the /v1 prefix

Ryan
20 Oct, 2023, 08:20

If you're using it with Flutter, this should explain it better and in more detail https://appwrite.io/docs/quick-starts/flutter

pitchar
20 Oct, 2023, 08:25

should i put some data first and http://my_ip/v1 is accessable or should i just put http://my_ip for my endpoint

Ryan
20 Oct, 2023, 08:25

The endpoint should be http://my_ip/v1 but you will want to create databases and collections through the console at http://my_ip

pitchar
20 Oct, 2023, 08:27

yes but i already created a database but still my endpoint is inaccesable

Ryan
20 Oct, 2023, 08:28

You need to use a different endpoint if you're trying to access a database https://appwrite.io/docs/references/cloud/server-rest/databases

Ryan
20 Oct, 2023, 08:29

The docs explains how to access databases and get data from them through the different endpoints

pitchar
20 Oct, 2023, 08:45

still not solve my problem. how come the other can access the appwrite given endpoint but i cant

pitchar
20 Oct, 2023, 08:49

the appwrite given endpoit should be accessible right or its there a setting for it

Ryan
20 Oct, 2023, 08:50

What is the full endpoint that you are trying to access? The endpoint will be slightly different depending on what specific data you are trying to access

pitchar
20 Oct, 2023, 08:51

http://192.168.1.104/v1 this given endpoint i want it to be accessible

Ryan
20 Oct, 2023, 08:52

The response you got is from Appwrite so the endpoint is accessible. The problem is that the endpoint isn't designed to provide any data, you need to use an endpoint like http://192.168.1.104/v1/databases/{databaseId}/collections/{collectionId}/documents to get access to the data

pitchar
20 Oct, 2023, 08:59

but how come my companion can access it by clicking on it and he can be directed to his appwrite project in chrome but i cant did i miss some settings

pitchar
20 Oct, 2023, 09:07

if i put v1 it gives error

pitchar
20 Oct, 2023, 09:08

but if just put http://192.168.1.104/ it accesible

Ryan
20 Oct, 2023, 09:08

Mine works the same as yours does, it sounds like you've got it setup correctly

D5
20 Oct, 2023, 09:21

The endpoint should have v1

D5
20 Oct, 2023, 09:22

To access console it should be excluded

rua
23 Dec, 2023, 20:04

Hi! Ialso have the same problem.

rua
23 Dec, 2023, 20:05

I am following a tutorial and when they use endPoint = 'http://localhost:80/v1' it works. When I click on it it gives the same error mentioned below

Christy Jacob
23 Dec, 2023, 20:08

Hey /v1 is not a valid endpoint

Christy Jacob
23 Dec, 2023, 20:08

thats why it says route not found.

D5
23 Dec, 2023, 20:17

It's expected behaviour.

/v1 is the endpoint for the API to work. In other words it's what you should specify to your app SDK to work. If you try to go there without specifying anything directly through your browser it will not work since you're not requesting anything there.

Main domain without anything will go to /console who is the user interface where you manage everything

D5
23 Dec, 2023, 20:21

@pitchar Can I mark this as solved?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more