You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Separation of client and admin routes in the API #269
Many users find it hard to understand the differences between client and admin mode. This document attempts to explain the differences, but this doesn't seem to be intuitive enough for developers starting to use the Appwrite API.
The idea behind this issue is to separate both modes into different sets of routes. This way, all docs, SDKs, and routes for client and admin will be independent, and concepts like API authentication, permissions, and SDK integration will be easier to understand. This will also help us make the user experience more dedicated to each mode (removing un-needed params)
For example, after this change this are the routes we'll have:
Client:
/v1/account
/v1/database
/v1/storage
/v1/teams
/v1/locale
/v1/avatars
Admin:
/v1/admin/users
/v1/admin/database
/v1/admin/storage
/v1/admin/teams
Some new admin routes we'll be able to expose that way:
/v1/admin/project
/v1/admin/webhooks
/v1/admin/keys (API Keys)
/v1/admin/tasks
/v1/admin/platforms
This change will also result in a separate set of SDKs. For admin: PHP, Node, Python, Ruby, Go, etc... and for client: JS, Node, Dart, Swift, Kotlin, etc...
I think this will also help us reach our goal of making Appwrite truly cross-platform and the first BaaS (backend as a service) that can integrate in 3 ways:
Directly from a client
Behind a proxy (or custom) server
Alongside a custom server (Using admin API and webhooks for integration)
Hey @eldadfux I think this is a very good idea, also will this change the view of the dashboard? Because if a normal user can't create a DB for example, he shouldn't have the button to create it, so I think we should also make changes to the dashboard, what do you think?
@PedroCisnerosSantana Hopefully will be able to have on the dashboard any actions that will be available from the admin API (aka backend or server API). The Appwrite dashboard is only intended for the use of developers building apps and not users using the app, so there is no reason not to let developers create a new database.
This change will lead to a situation where admin only action will not be available on the client SDK, so the confusion won't be possible.
So while working on this, I had a realization that I might be able to keep using the same paths for routes in admin and client modes while maintaining the separations limited only to the SDKs and docs level.
This might help us both in making everything more clear and help us make sure developers trying to use routes meant for admin only use them from the client-side. The other benefit is that we could avoid managing routes duplications.
I still have to make sure no route is behaving radically different in both modes, but if the theory turns out correct, I think it will be a better solution than what I originally started with.
Activity
W4nn4Die commentedon Dec 18, 2019
Hey @eldadfux I think this is a very good idea, also will this change the view of the dashboard? Because if a normal user can't create a DB for example, he shouldn't have the button to create it, so I think we should also make changes to the dashboard, what do you think?
eldadfux commentedon Dec 19, 2019
@PedroCisnerosSantana Hopefully will be able to have on the dashboard any actions that will be available from the admin API (aka backend or server API). The Appwrite dashboard is only intended for the use of developers building apps and not users using the app, so there is no reason not to let developers create a new database.
This change will lead to a situation where admin only action will not be available on the client SDK, so the confusion won't be possible.
eldadfux commentedon Dec 24, 2019
So while working on this, I had a realization that I might be able to keep using the same paths for routes in admin and client modes while maintaining the separations limited only to the SDKs and docs level.
This might help us both in making everything more clear and help us make sure developers trying to use routes meant for admin only use them from the client-side. The other benefit is that we could avoid managing routes duplications.
I still have to make sure no route is behaving radically different in both modes, but if the theory turns out correct, I think it will be a better solution than what I originally started with.
eldadfux commentedon Feb 22, 2020
This feature is ready and available on the master branch. Will be released with version 0.5.
Merge pull request appwrite#269 from utopia-php/fix/storage-minio-quay