I am trying to automate the whole deployment/recreation of an appwrite application. Some parts I did with the GUI seem quite hard to automate with the CLI only (will open several tickets).
If I have a fresh installation and I want to create the very first project with the CLI this requires me a teamId, and leting it empty does not help:
AppwriteException [Error]: Team with the requested ID could not be found.```
Sure I cannot create a new team or apparently do nothing as almost all commands reply with
```$ appwrite teams create --teamId .... --name name
✗ Error Project with the requested ID could not be found. Please check the value of the X-Appwrite-Project header to ensure the correct project ID is being used.```
How should I proceed using the CLI?
The TeamID required is the organization one, the one you've created when first signing up into your Appwrite instance.
You can find in the URL in the main projects page
https://cloud.appwrite.io/console/organization-TEAM_ID
no cloud... only self host
will have to check that in detail
@Binyamin I need somehow to query that, with rest or appwrite's CLI
✗ Error Access to this API is forbidden.
the pointer you gave me is good, I can indeed create a project on the CLI this way
just need to find out how to fetch non interactively the orgnization id
so bad that appwrite teams list --json
returns all memberships but not the organization which the same API with curl does indeed return it https://domain/v1/teams
so frustrating
For that part I think is best to create a feature request for it.
You can do it by using the cli as library Check this
Doing it using the CLI can be complicated considering switching between project IDs.
I highly recommend doing it manually via the console and inspecting the network logs using your browser dev tools. You'll see what API calls are made and then you can recreate those calls using curl
thanks, that's how I ended up automating it
[SOLVED] (automation) create a brand new project using Appwrite CLI
Recommended threads
- Appwriter Linux Key Bindings
Any tips for configuring appwriter for ubuntu? Actually the keybindings are tightly binded to either windows or mac. Working well on windows but in ubuntu some ...
- Admin Impersonating Clients?
I have a client that needs to use the admin User, to impersonate the Clients in order to debug better the App and the services that they are providing, could yo...
- create project api-rest
Hello good afternoon, I'm developing a project where I need to create a project by apirest, but I'm stuck with this "projects.read" permission, can I change my ...