Appwrite. Services. Sites
(appwrite v1.0.0)
View Source
The Sites service allows you to deploy and manage static or server-rendered web applications hosted on Appwrite Cloud.
This is an entirely new Appwrite Cloud service added in v1.0.0.
Concepts
- Site – a deployable web application (think Vercel/Netlify projects)
- Deployment – a specific build/version of a Site (each push creates one)
- Variable – environment variable scoped to a Site (separate from Functions)
- Log – a build or runtime log entry for a Deployment
Summary
Functions
Create a new Deployment for a Site (upload source code as a tarball).
Create a new Site.
Create an environment Variable for a Site.
Delete a Deployment by its unique ID.
Delete a specific Log entry.
Delete a Site by its unique ID.
Delete a Variable by its unique ID.
Get a Deployment by its unique ID.
Download a Deployment's source archive.
Get a specific Log entry.
Get a Site by its unique ID.
Get a Variable by its unique ID.
List Deployments for a Site.
List build/runtime Logs for a Site.
List all Sites in the project.
List Variables for a Site.
Update a Deployment — activate it (make it live).
Update a Site's configuration.
Update a Variable.
Functions
@spec create_deployment(String.t(), binary(), boolean(), String.t() | nil) :: {:ok, map()} | {:error, any()}
Create a new Deployment for a Site (upload source code as a tarball).
Parameters
site_id(required)code(required) – gzip-compressed tar archive of the site sourceactivate(required) – whentrue, automatically activates the deploymententry_point(optional) – path to the server entry file (SSR only)
@spec create_site(String.t(), String.t(), String.t() | nil, keyword()) :: {:ok, map()} | {:error, any()}
Create a new Site.
Parameters
site_id(required) – unique identifier; use"unique()"to auto-generatename(required) – display nameframework(optional) – framework hint:"nextjs","nuxt","sveltekit","astro","remix","other", etc.optskeyword list::build_command– shell command to build the site:output_directory– directory of the build output (e.g."dist"):install_command– shell command to install dependencies:root_directory– monorepo sub-path:specification– compute specification for SSR (e.g."s-1vcpu-512mb"):timeout– max execution time for SSR in seconds:enabled– boolean (defaulttrue):logging– boolean — enable/disable access logs (defaulttrue)
Create an environment Variable for a Site.
Parameters
site_id(required)key(required) – variable name (e.g."API_KEY")value(required) – variable value
Delete a Deployment by its unique ID.
Parameters
site_id(required)deployment_id(required)
Delete a specific Log entry.
Parameters
site_id(required)log_id(required)
Delete a Site by its unique ID.
Parameters
site_id(required)
Delete a Variable by its unique ID.
Parameters
site_id(required)variable_id(required)
Get a Deployment by its unique ID.
Parameters
site_id(required)deployment_id(required)
Download a Deployment's source archive.
Parameters
site_id(required)deployment_id(required)
Returns the download URL as a string.
Get a specific Log entry.
Parameters
site_id(required)log_id(required)
Get a Site by its unique ID.
Parameters
site_id(required)
Get a Variable by its unique ID.
Parameters
site_id(required)variable_id(required)
@spec list_deployments(String.t(), [String.t()] | nil, String.t() | nil) :: {:ok, map()} | {:error, any()}
List Deployments for a Site.
Parameters
site_id(required)queries(optional)search(optional)
List build/runtime Logs for a Site.
Parameters
site_id(required)queries(optional)
List all Sites in the project.
Parameters
queries(optional)search(optional)
List Variables for a Site.
Parameters
site_id(required)
Update a Deployment — activate it (make it live).
Parameters
site_id(required)deployment_id(required)
Update a Site's configuration.
Parameters
site_id(required)name(required) – new display nameopts– same keyword list ascreate_site/4minussite_id
@spec update_variable(String.t(), String.t(), String.t(), String.t() | nil) :: {:ok, map()} | {:error, any()}
Update a Variable.
Parameters
site_id(required)variable_id(required)key(required)value(optional)