Skip to content

Separation of client and admin routes in the API #269

Closed

Description

@eldadfux

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)

Activity

  1. self-assigned this
    on Dec 15, 2019
  2. added
    discussion
    enhancement
    on Dec 15, 2019
  3. W4nn4Die commented on Dec 18, 2019

    @W4nn4Die
    Contributor

    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?

  4. eldadfux commented on Dec 19, 2019

    @eldadfux
    MemberAuthor

    @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.

  5. eldadfux commented on Dec 24, 2019

    @eldadfux
    MemberAuthor

    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.

  6. eldadfux commented on Feb 22, 2020

    @eldadfux
    MemberAuthor

    This feature is ready and available on the master branch. Will be released with version 0.5.

  7. added a commit that references this issue on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions